Constructs a new SocketServerManager.
Where configs specific to the ServerManager are stored.
Contains a reference to the HttpServer that this manager is attached to. (only available after it has been attached)
Socket.io server instance for managing socket communication.
Contains implementations for the events described by the API. This guarantees compatibility with any SocketClient that implements the same API.
Adds a namespace to the socket server. Throws an error if the namespace already exists.
Sets up the socket handlers for the given namespace.
Gives the ability to block and wait for an event. Usage: await this.blockEvent('some-event');
Configures the SocketServerManager.
Emits an event to the given target. The typings ensure that only events defined in the API can be emitted.
Returns a list of all the active namespaces on the socket server.
Since there can be multiple managers on an HttpServer, one manager may wish to communicate with another. This function will return one of the other managers by name.
Gets the HttpServer that this ServerManager is attached to. (only available after it has been attached)
Processes an incoming event with the appropriate socketHandler. If the handler returns an EventResponse, the proper event will automatically be emitted.
Removes a namespace from the socket server.
Handles a Response that requires a reply.
Attaches a socket.io server to the internal Node http server.
Cleans up any socket-related junk.
Returns the default configuration for a SocketServerManager.
Generated using TypeDoc
A simple SocketServer with an API protected by TypeScript.