connections

api. connections

Source:
Properties:
Name Type Description
connections Object

Dictionary of currently-established client connections.

middleware Object

Dictionary of loaded middleware modules.

globalMiddleware Array

Array of global middleware modules.

allowedVerbs Array

Verbs the server will allow clients to send.

Server connection handling.

Extends

Methods

(static) addMiddleware(data)

Source:
See:

Add a middleware component to connection handling.

Parameters:
Name Type Description
data object

The middleware definition to add.

(async, static) apply(connectionId, method, args) → {Promise.<Object>}

Source:

Find a connection on any server in the cluster and call a method on it.

Parameters:
Name Type Description
connectionId String

The connection's ID

method String

the name of the method to call

args Array

the arguments to pass to method

Returns:

The return value from the remote server (if any)

Type
Promise.<Object>