public interface ClientSocketListener
extends java.util.EventListener
ClientSocket
related events.Modifier and Type | Method and Description |
---|---|
void |
connected()
Called after a connection to a Crossfire server has been established.
|
void |
connecting()
Called when connecting to a Crossfire server.
|
void |
disconnected(@NotNull java.lang.String reason)
Called after the connection has been closed.
|
void |
disconnecting(@NotNull java.lang.String reason,
boolean isError)
Called when the connection is being teared down.
|
void |
packetReceived(@NotNull java.nio.ByteBuffer packet)
Called whenever a packet is received from the Crossfire server.
|
void |
packetSent(@NotNull ClientSocketMonitorCommand monitor)
Called whenever a packet has been sent to the Crossfire server.
|
void connecting()
void connected()
void packetReceived(@NotNull @NotNull java.nio.ByteBuffer packet) throws UnknownCommandException
packet
- the packet contentsUnknownCommandException
- if the packet cannot be processedvoid packetSent(@NotNull @NotNull ClientSocketMonitorCommand monitor)
monitor
- the monitor command to send to script processesvoid disconnecting(@NotNull @NotNull java.lang.String reason, boolean isError)
reason
- the disconnect reasonisError
- whether the disconnect is unexpectedvoid disconnected(@NotNull @NotNull java.lang.String reason)
reason
- the disconnect reason