Class: HeadersPacket

net/packets~HeadersPacket(itemsnullable)

Headers Packet

Constructor

new HeadersPacket(itemsnullable)

Create a headers packet.

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

Extends

  • Packet

Methods

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

Instantiate headers packet from serialized data.

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

(private) fromRaw(data)

Inject properties from serialized data.

Parameters:
Name Type Description
data Buffer
Source:

(private) fromReader(br)

Inject properties from buffer reader.

Parameters:
Name Type Description
br BufferReader
Source:

getSize() → {Number}

Get serialization size.

Source:
Returns:
Type
Number

toRaw() → {Buffer}

Serialize headers packet.

Source:
Returns:
Type
Buffer

toWriter(bw)

Serialize headers packet to writer.

Parameters:
Name Type Description
bw BufferWriter
Source: