Class: FilterLoadPacket

net/packets~FilterLoadPacket(filter)

FilterLoad Packet

Constructor

new FilterLoadPacket(filter)

Create a filterload packet.

Parameters:
Name Type Description
filter BloomFilter | null
Source:

Extends

  • Packet

Methods

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

Instantiate filterload packet from serialized data.

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

(static) fromReader(br) → {FilterLoadPacket}

Instantiate filterload packet from buffer reader.

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

(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

isWithinConstraints() → {Boolean}

Ensure the filter is within the size limits.

Source:
Returns:
Type
Boolean

toRaw() → {Buffer}

Serialize filterload packet.

Source:
Returns:
Type
Buffer

toWriter(bw)

Serialize filterload packet to writer.

Parameters:
Name Type Description
bw BufferWriter
Source: