Interface: IConnectionManager

IConnectionManager

Manages connections.

Source:

Members

connectionCount :number

Number of connections managed by the object.

Type:
  • number
Source:

Methods

closeConnection(connection, reason)

Closes the target connection.

Parameters:
Name Type Description
connection Stormancer.IConnection

The connection to close.

reason string

The reason why the connection was closed.

Source:

generateNewConnectionId() → {number}

Generates an unique connection id for this node. Only used on servers.

Source:
Returns:

A number containing an unique ID.

Type
number

getConnection(id) → {Stormancer.IConnection}

Returns a connection by ID.

Parameters:
Name Type Description
id number

The connection ID.

Source:
Returns:

The connection attached to this ID.

Type
Stormancer.IConnection

newConnection(connection)

Adds a connection to the manager. This method is called by the infrastructure when a new connection connects to a transport.

Parameters:
Name Type Description
connection Stormancer.IConnection

The connection object to add.

Source: