error
message.
Members
(static, constant) ERROR :number
It's an error, something was going wrong (e.g. an object got lost).
Type:
- number
- Source:
(static, constant) FATAL :number
It's a fatal error. The node will drop the line for that error and maybe ban you for some time.
Type:
- number
- Source:
(static, constant) WARNING :number
Just a warning.
Type:
- number
- Source:
Methods
(static) decode(buf) → {DecodeResult}
Decode error
message.
Parameters:
Name | Type | Description |
---|---|---|
buf |
Buffer | Message |
- Source:
Returns:
- Type
- DecodeResult
(static) decodePayload()
Decode error
message payload.
The same as decode.
- Source:
(static) encode(opts) → {Buffer}
Encode error
message.
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
Object | Error options Properties
|
- Source:
Returns:
Encoded message.
- Type
- Buffer
(static) encodePayload()
Encode error
message payload.
The same as encode.
- Source:
Type Definitions
DecodeResult
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
fatal |
number | Type of the error |
|
banTime |
number | The other node informs that it will not accept further connections for this number of seconds |
|
vector |
Buffer |
<nullable> |
Inventory vector related to the error |
errorText |
string | A human-readable error description |
|
length |
number | Real data length |
- Source: