Interface ClientSocketListener
- All Superinterfaces:
EventListener
Interface for listeners interested in
ClientSocket related events.-
Method Summary
Modifier and TypeMethodDescriptionvoidCalled after a connection to a Crossfire server has been established.voidCalled when connecting to a Crossfire server.voiddisconnected(@NotNull String reason) Called after the connection has been closed.voidpacketReceived(@NotNull ByteBuffer packet) Called whenever a packet is received from the Crossfire server.voidpacketSent(@NotNull ClientSocketMonitorCommand monitor) Called whenever a packet has been sent to the Crossfire server.
-
Method Details
-
connecting
void connecting()Called when connecting to a Crossfire server. -
connected
void connected()Called after a connection to a Crossfire server has been established. -
packetReceived
Called whenever a packet is received from the Crossfire server.- Parameters:
packet- the packet contents- Throws:
UnknownCommandException- if the packet cannot be processed
-
packetSent
Called whenever a packet has been sent to the Crossfire server.- Parameters:
monitor- the monitor command to send to script processes
-
disconnected
Called after the connection has been closed.- Parameters:
reason- the disconnect reason
-