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:
(static) type2str(type) → {string}
Convert error type to a human-readable string.
Parameters:
Name | Type | Description |
---|---|---|
type |
number | Type of the error |
- Source:
Returns:
- Type
- string
Type Definitions
DecodeResult
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
type |
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: