Class: UnknownPacket

net/packets~UnknownPacket(cmd, data)

Unknown Packet

Constructor

new UnknownPacket(cmd, data)

Create an unknown packet.

Parameters:
Name Type Description
cmd String | null
data Buffer | null
Properties:
Name Type Description
cmd String
data Buffer
Source:

Extends

  • Packet

Methods

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

Instantiate unknown packet from serialized data.

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

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

Source:
Returns:
Type
Buffer

toWriter(bw)

Serialize unknown packet to writer.

Parameters:
Name Type Description
bw BufferWriter
Source: