Constructor
new Message(data)
The Message class encapsulates a WebSocket message.
Parameters:
Name | Type | Description |
---|---|---|
data | Object |
- Since
- 3.4.0
- Copyright
- schukai GmbH
- License
- AGPLv3
Throws:
value is not a object
- Type
- TypeError
Methods
getData() → {object}
Returns the raw message.
Returns the raw message.
Returns:
- Type:
- object
toJSON() → {*}
Returns:
- Type:
- *
(static) fromJSON(json) → {Message}
Parameters:
Name | Type | Description |
---|---|---|
json | string |
Throws:
value is not a string
- Type
- TypeError
Returns:
- Type:
- Message