Constructor
new SocketServer(setup)
Creates a new instance of the SocketServer class.
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
setup |
Object | The setup object. Properties
|
- Source:
Members
connections :Array.<SocketConnection>
An array of active socket connections.
Type:
- Array.<SocketConnection>
- Source:
io :object
The socket.io server instance.
Type:
- object
- Source:
port :number
The port on which the socket server is running.
Type:
- number
- Source:
subscriptions :Array
An array of active subscriptions.
Type:
- Array
- Source:
Methods
getConnection(connectionID) → {SocketConnection|undefined}
Retrieves a socket connection based on the provided connection ID.
Parameters:
| Name | Type | Description |
|---|---|---|
connectionID |
string | The unique identifier of the socket connection. |
- Source:
Returns:
- The socket connection with the given ID or undefined if not found.
- Type
- SocketConnection | undefined