MCPcopy
hub / github.com/aceld/zinx / AddCloseCallback

Method AddCloseCallback

znet/ws_connection.go:613–620  ·  view source on GitHub ↗
(handler, key interface{}, f func())

Source from the content-addressed store, hash-verified

611}
612
613func (s *WsConnection) AddCloseCallback(handler, key interface{}, f func()) {
614 if s.isClosed {
615 return
616 }
617 s.closeCallbackMutex.Lock()
618 defer s.closeCallbackMutex.Unlock()
619 s.closeCallback.Add(handler, key, f)
620}
621
622func (s *WsConnection) RemoveCloseCallback(handler, key interface{}) {
623 if s.isClosed {

Callers

nothing calls this directly

Calls 1

AddMethod · 0.65

Tested by

no test coverage detected