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

Method sendProto

nats.go:2907–2912  ·  view source on GitHub ↗

Sends a protocol control message by queuing into the bufio writer and kicking the flush Go routine. These writes are protected.

(proto string)

Source from the content-addressed store, hash-verified

2905// Sends a protocol control message by queuing into the bufio writer
2906// and kicking the flush Go routine. These writes are protected.
2907func (nc *Conn) sendProto(proto string) {
2908 nc.mu.Lock()
2909 nc.bw.appendString(proto)
2910 nc.kickFlusher()
2911 nc.mu.Unlock()
2912}
2913
2914// Generate a connect protocol message, issuing user/password if
2915// applicable. The lock is assumed to be held upon entering.

Callers 1

processPingMethod · 0.95

Calls 2

kickFlusherMethod · 0.95
appendStringMethod · 0.80

Tested by

no test coverage detected