MCPcopy
hub / github.com/nats-io/nats.go / newReaderWriter

Method newReaderWriter

nats.go:2150–2159  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2148}
2149
2150func (nc *Conn) newReaderWriter() {
2151 nc.br = &natsReader{
2152 buf: make([]byte, defaultBufSize),
2153 off: -1,
2154 }
2155 nc.bw = &natsWriter{
2156 limit: nc.Opts.WriteBufferSize,
2157 plimit: nc.Opts.ReconnectBufSize,
2158 }
2159}
2160
2161func (nc *Conn) bindToNewConn() {
2162 bw := nc.bw

Callers 5

TestParserPingFunction · 0.95
TestParserErrFunction · 0.95
TestWriteBufferSizeFunction · 0.95
ConnectMethod · 0.95

Calls

no outgoing calls

Tested by 4

TestParserPingFunction · 0.76
TestParserErrFunction · 0.76
TestWriteBufferSizeFunction · 0.76