Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/djherbis/socket
/ OnPacket
Method
OnPacket
handler.go:41–49 ·
view source on GitHub ↗
(p Packet)
Source
from the content-addressed store, hash-verified
39
}
40
41
func
(h *handler) OnPacket(p Packet) {
42
h.mu.RLock()
43
c, ok := h.events[p.Event()]
44
h.mu.RUnlock()
45
46
if
ok {
47
c.OnPacket(p)
48
}
49
}
Callers
nothing calls this directly
Calls
2
Event
Method · 0.65
OnPacket
Method · 0.65
Tested by
no test coverage detected