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

Method isConnected

nats.go:6267–6269  ·  view source on GitHub ↗

Test if Conn is connected or connecting.

()

Source from the content-addressed store, hash-verified

6265
6266// Test if Conn is connected or connecting.
6267func (nc *Conn) isConnected() bool {
6268 return nc.status == CONNECTED || nc.isDraining()
6269}
6270
6271// Test if Conn is in the draining state.
6272func (nc *Conn) isDraining() bool {

Callers 3

TLSConnectionStateMethod · 0.95
flusherMethod · 0.95
IsConnectedMethod · 0.95

Calls 1

isDrainingMethod · 0.95

Tested by

no test coverage detected