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

Method RemoveCloseCallback

znet/kcp_connection.go:616–623  ·  view source on GitHub ↗
(handler, key interface{})

Source from the content-addressed store, hash-verified

614}
615
616func (s *KcpConnection) RemoveCloseCallback(handler, key interface{}) {
617 if s.isClosed() {
618 return
619 }
620 s.closeCallbackMutex.Lock()
621 defer s.closeCallbackMutex.Unlock()
622 s.closeCallback.Remove(handler, key)
623}
624
625// invokeCloseCallbacks 触发 close callback, 在独立协程完成
626func (s *KcpConnection) InvokeCloseCallbacks() {

Callers

nothing calls this directly

Calls 2

isClosedMethod · 0.95
RemoveMethod · 0.65

Tested by

no test coverage detected