version
message.
Methods
(static) decode(buf) → {DecodeResult}
Decode version
message.
NOTE: nonce
is copied.
Parameters:
Name | Type | Description |
---|---|---|
buf |
Buffer | Message |
- Source:
Returns:
- Type
- DecodeResult
(static) decodePayload()
Decode version
message payload.
The same as decode.
- Source:
(static) encode(opts) → {Buffer}
Encode version
message.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
Object | Version options Properties
|
- Source:
Returns:
Encoded message.
- Type
- Buffer
(static) encodePayload()
Encode version
message payload.
The same as encode.
- Source:
Type Definitions
DecodeResult
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
services |
Object | Service features to be enabled for this connection |
time |
Date | Node time |
remoteHost |
string | IPv4/IPv6 address of the node receiving this message |
remotePort |
number | Port of the node receiving this message |
port |
number | Incoming port of the node sending this message |
nonce |
Buffer | Random nonce used to detect connection to self |
userAgent |
Array | string | Buffer | User agent of the node |
streamNumbers |
Array.<number> | Streams accepted by the node |
length |
number | Real data length |
- Source: