Binding function to event
Listening to socket event become simple with @SocketOn method
SugoiJS socket module provides the @SocketOn(event:string, namespace:string="/")
decorator.
This decorator registers the function as a callback for an event.
Example
You can bind one function to multiple events by use multiple @SocketOn
decorators.
Last updated