new Payload(event, data)
Parameters:
| Name | Type | Description |
|---|---|---|
event |
string | |
data |
* |
Members
-
static, constant HEADER_SIZE
-
The byte size of the header
Methods
-
toBuffer() → {Buffer}
-
Composes a binary package with a header and body
Returns:
Buffer -
toStringifiedJson() → {string}
-
Returns:
string - Stringified JSON