JSDoc: Class: Message

# Class: Message

## Message()

#### new Message()

Representation of the packets transproted over the wire.

Source:
  - message.js, line 43

### 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:
  - message.js, line 60

##### Throws:

If the message type is not recognised.

Type
  TypeError

##### Returns:

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

Type
  Message