MCPcopy Create free account
hub / github.com/djherbis/socket / EventHandler

Interface EventHandler

handler.go:13–15  ·  view source on GitHub ↗

EventHandler registers a function to be run when an event is received. The arguments to the function will be unmarshalled from the javascript objects emitted by the client-side socket.

Source from the content-addressed store, hash-verified

11// The arguments to the function will be unmarshalled from the
12// javascript objects emitted by the client-side socket.
13type EventHandler interface {
14 On(event string, fn interface{}) error
15}
16
17// Handler is both a PacketHandler and a EventHandler
18type Handler interface {

Callers 5

OnMethod · 0.65
OnMethod · 0.65
mainFunction · 0.65
mainFunction · 0.65
mainFunction · 0.65

Implementers 3

handlerhandler.go
clientSocketclient.go
namespacenamespace.go

Calls

no outgoing calls

Tested by

no test coverage detected