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

Method sendPing

nats.go:5764–5769  ·  view source on GitHub ↗

The lock must be held entering this function.

(ch chan struct{})

Source from the content-addressed store, hash-verified

5762
5763// The lock must be held entering this function.
5764func (nc *Conn) sendPing(ch chan struct{}) {
5765 nc.pongs = append(nc.pongs, ch)
5766 nc.bw.appendString(pingProto)
5767 // Flush in place.
5768 nc.bw.flush()
5769}
5770
5771// This will fire periodically and send a client origin
5772// ping to the server. Will also check that we have received

Callers 3

processPingTimerMethod · 0.95
FlushTimeoutMethod · 0.95
FlushWithContextMethod · 0.95

Calls 2

appendStringMethod · 0.80
flushMethod · 0.80

Tested by

no test coverage detected