Class: AddrPacket

net/packets~AddrPacket(itemsnullable)

Addr Packet

Constructor

new AddrPacket(itemsnullable)

Create a addr packet.

Parameters:
Name Type Attributes Description
items Array.<NetAddress> <nullable>
Properties:
Name Type Description
items Array.<NetAddress>
Source:

Extends

  • Packet

Methods

(static) fromRaw(data, encnullable) → {AddrPacket}

Instantiate addr packet from serialized data.

Parameters:
Name Type Attributes Description
data Buffer
enc String <nullable>
Source:
Returns:
Type
AddrPacket

(static) fromReader(br) → {AddrPacket}

Instantiate addr packet from Buffer reader.

Parameters:
Name Type Description
br BufferReader
Source:
Returns:
Type
AddrPacket

(private) fromRaw(data)

Inject properties from serialized data.

Parameters:
Name Type Description
data Buffer
Source:

getSize() → {Number}

Get serialization size.

Source:
Returns:
Type
Number

toRaw() → {Buffer}

Serialize addr packet.

Source:
Returns:
Type
Buffer

toWriter(bw)

Serialize addr packet to writer.

Parameters:
Name Type Description
bw BufferWriter
Source: