Class: Message

Message()

new Message()

Representation of the packets transproted over the wire.

Source:

Methods

(static) fromMsg(data) → {Message}

Converts a data packet into a Command or Response type.

Parameters:
Name Type Description
data Array.<number, number, ?, ?>

A four element array where the elements, in sequence, signifies message type, message ID, method name or error, and parameters or result.

Source:
Throws:

If the message type is not recognised.

Type
TypeError
Returns:

Based on the message type, a Command or Response instance.

Type
Message