public interface ClientListener
The ClientListener
interface specifies which methods an object needs
to have in order to be able to function as a client listener. The client listener
will be notified when the client connects to the server, when it disconnects or
is disconnected, and when a message is received from the server.
To specify what object will be your ClientListener
, use the
Network.configure()
method.
Network.configure(String, ServerListener, ClientListener)
Method Summary | |
---|---|
void |
clientConnected(Client client)
This method will be called when the client connects to the server. |
void |
clientDisconnected(Client client)
This method will be called when the client disconnects or is disconnected from the server. |
void |
messageReceived(Client client,
String message)
This method will be called when a message is received from the server. |
Method Detail |
---|
void clientConnected(Client client)
client
- The clientvoid clientDisconnected(Client client)
client
- The clientvoid messageReceived(Client client, String message)
client
- The clientmessage
- Message that was received