Interface Packet
- All Known Subinterfaces:
StreamPacket
- All Known Implementing Classes:
ClajMessagePacket, ClajPackets.Connect, ClajPackets.Disconnect, ClajPackets.Idle, ClajPopupPacket, ClajTextMessagePacket, ConnectionClosedPacket, ConnectionIdlingPacket, ConnectionJoinPacket, ConnectionPayloadPacket, ConnectionWrapperPacket, RawPacket, RoomClosedPacket, RoomClosureRequestPacket, RoomConfigPacket, RoomCreationRequestPacket, RoomInfoDeniedPacket, RoomInfoPacket, RoomInfoRequestPacket, RoomJoinAcceptedPacket, RoomJoinDeniedPacket, RoomJoinPacket, RoomJoinRequestPacket, RoomLinkPacket, RoomListPacket, RoomListRequestPacket, RoomStatePacket, RoomStateRequestPacket, ServerInfoPacket, StreamChunk, StreamHead
public interface Packet
Base packet of CLaJ protocol.
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanallow(boolean isServer) default voidCalled when the client handle this packet.default voidhandleServer(arc.net.Connection con) Called when the server handle this packet.default <T extends Packet>
Tr(arc.util.io.ByteBufferInput read) default voidread(arc.util.io.ByteBufferInput read) default <T extends Packet>
Tw(arc.util.io.ByteBufferOutput write) default voidwrite(arc.util.io.ByteBufferOutput write)
-
Method Details
-
read
default void read(arc.util.io.ByteBufferInput read) -
write
default void write(arc.util.io.ByteBufferOutput write) -
r
-
w
-
allow
default boolean allow(boolean isServer) - Returns:
- whether this packet should be allowed or ignored, for the type of endpoint.
-
handleClient
default void handleClient()Called when the client handle this packet. Only called when no listener is defined for this packet. -
handleServer
default void handleServer(arc.net.Connection con) Called when the server handle this packet. Only called when no listener is defined for this packet.
-