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


Methods

addListener (event, funct)

This method add an event listener with custom logic.

Parameters

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

Parameters

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