@ThreadSafe public class UnknownPacket extends Object implements Packet
| Constructor and Description |
|---|
UnknownPacket() |
| Modifier and Type | Method and Description |
|---|---|
Packet |
decode(ByteBuf buf)
Sets the fields of the packet from the data serialized into the buffer
|
PacketDirection |
direction()
Returns the packet direction
|
void |
encode(ByteBuf buf)
Serialized the data held by this packet into a buffer
|
void |
handleReceived(ClientConnection connection)
Handles the packet after receiving it from a connection, is invoked by the ClientConnection that received it
|
int |
id()
Gets the ID of this packet, according to the protocol specification
|
public UnknownPacket()
public Packet decode(ByteBuf buf)
Packetpublic void encode(ByteBuf buf)
Cannot be encoded. Throws UnsupportedOperationException
public int id()
Packetpublic PacketDirection direction()
Returns null, since we don't know where the packet came from
direction in interface PacketPacketDirection.IN or
PacketDirection.OUT depending on directionpublic void handleReceived(ClientConnection connection)
Used to allow the packet to notify the ClientConnection
of packets the server receives, and make changes specific to this packet
Does not do anything
handleReceived in interface Packetconnection - The connection that sent the packetCopyright © 2016. All rights reserved.