Module: ClientMessager

Sends messages to Clients.

Source:

Methods

(static) error(client, err)

Send an error message to a Client.

Parameters:
Name Type Description
client Client

The client to send the error to

err Error

The error to send to the client

Source:
Example

Messaging a client an error

ClientMessager.error(client, 'Error!');

(static) send(client, message)

Send a message to a Client.

Parameters:
Name Type Description
client Client

The client to send the message to

message object

The message to send, JSON-serialized, to the client

Source:
Example

Messaging a client

ClientMessager.send(client, { hello: 'world' });