Contents
Interface IPacketReceiver
- All Known Implementing Classes:
AssetEditorPacketHandler, AuthenticationPacketHandler, GamePacketHandler, GenericConnectionPacketHandler, GenericPacketHandler, HandshakeHandler, InitialPacketHandler, PacketHandler, PasswordPacketHandler, SetupPacketHandler
public interface IPacketReceiver
-
Method Summary
Modifier and TypeMethodDescriptionvoidwrite(ToClientPacket packet) Writes the packet, caching it first to prevent race conditions between the world thread and netty writing the packet.voidwriteNoCache(ToClientPacket packet) Writes the packet without first caching the packet.
-
Method Details
-
write
Writes the packet, caching it first to prevent race conditions between the world thread and netty writing the packet.- Parameters:
packet- the packet to send.
-
writeNoCache
Writes the packet without first caching the packet. This method should only be used if you don't store the sent packet to be reused. eg.packetHandler.writeNoCache(new Ping(...))- Parameters:
packet- the packet to send.
-