Network address.
Methods
(static) decode(buf, optsopt) → {DecodeResult}
Decode net_addr
.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
buf |
Buffer | A buffer that contains encoded |
|
opts |
Object |
<optional> |
Decoding options; use |
- Source:
Returns:
- Type
- DecodeResult
(static) encode(opts) → {Buffer}
Encode net_addr
.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
Object | Encoding options Properties
|
- Source:
Returns:
Encoded net_addr
.
- Type
- Buffer
Type Definitions
DecodeResult
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
time |
Date | Time the node was last active, not included in short mode |
stream |
number | Stream number of the node, not included in short mode |
services |
Object | Services provided by the node |
host |
string | IPv4/IPv6 address of the node |
port |
number | Incoming port of the node |
- Source: