Class: PingPacket

net/packets~PingPacket(noncenullable)

Ping Packet

Constructor

new PingPacket(noncenullable)

Create a ping packet.

Parameters:
Name Type Attributes Description
nonce Buffer <nullable>
Properties:
Name Type Description
nonce Buffer | null
Source:

Extends

  • Packet

Methods

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

Instantiate ping packet from serialized data.

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

(static) fromReader(br) → {PingPacket}

Instantiate ping packet from serialized data.

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

(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 ping packet.

Source:
Returns:
Type
Buffer

toWriter(bw)

Serialize ping packet to writer.

Parameters:
Name Type Description
bw BufferWriter
Source: