This is a wrapper class around SocketIO, it adds convenience methods and late-binding of listeners.


addListener (event, funct)

This method add an event listener with custom logic.


Name Type Description
event String The event name
funct Function The function to execute on that event

start (port)

This method starts the SocketIO Server. When socketio is enabled this will be done automatically.

By default there are two events:

  • Register Used to register to a specific room

  • Unregister Used to unregister from a specific room


Name Type Description
port Number The port to start SocketIO on.