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

Method ClosedHandler

nats.go:1753–1760  ·  view source on GitHub ↗

ClosedHandler will return the closed event handler.

()

Source from the content-addressed store, hash-verified

1751
1752// ClosedHandler will return the closed event handler.
1753func (nc *Conn) ClosedHandler() ConnHandler {
1754 if nc == nil {
1755 return nil
1756 }
1757 nc.mu.Lock()
1758 defer nc.mu.Unlock()
1759 return nc.Opts.ClosedCB
1760}
1761
1762// SetErrorHandler will set the async error handler.
1763func (nc *Conn) SetErrorHandler(cb ErrHandler) {

Calls

no outgoing calls