init
method is socket server instance.
Although, there are few more way to get the instance of the server.getHandler
method returns the socket handler object which fits the given id. The handler later can be use for retrieving the socket server instance.getInstanceId()
method. null
will be returned.SocketHandler.getHandler(id?:string).getServer()
getSocketServer()
method. this method returns the socket server instancegetHandler
method for retrieve the SocketHandler object, afterwards we will apply the getNamespace(namespace:string)
for getting socket.io namespace object.SocketHandler.getHandler(id?:string).getNamespace("/")
getSocketNamespace()
method. this method returns the socket server instance