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