Method
AddCloseCallback
(handler, key interface{}, f func())
Source from the content-addressed store, hash-verified
| 605 | } |
| 606 | |
| 607 | func (s *KcpConnection) AddCloseCallback(handler, key interface{}, f func()) { |
| 608 | if s.isClosed() { |
| 609 | return |
| 610 | } |
| 611 | s.closeCallbackMutex.Lock() |
| 612 | defer s.closeCallbackMutex.Unlock() |
| 613 | s.closeCallback.Add(handler, key, f) |
| 614 | } |
| 615 | |
| 616 | func (s *KcpConnection) RemoveCloseCallback(handler, key interface{}) { |
| 617 | if s.isClosed() { |
Callers
nothing calls this directly
Tested by
no test coverage detected