public interface NetworkedWorldClient extends NetworkedWorld, ConnectionListener
Modifier and Type | Method and Description |
---|---|
void |
connect(java.lang.String ip,
int port)
Connect to a server.
|
byte |
getId()
Get the network id.
|
java.lang.String |
getName()
Get the client name.
|
int |
getPing()
Get the ping from the server (time elapsed between the ping request and response).
|
void |
notifyClientConnected(java.lang.Byte id,
java.lang.String name)
Notify when a new client is connected.
|
void |
notifyClientDisconnected(java.lang.Byte id,
java.lang.String name)
Notify when a client is disconnected.
|
void |
notifyClientNameChanged(java.lang.Byte id,
java.lang.String name)
Notify when a client changed its name.
|
void |
setName(java.lang.String name)
Set the client new name.
|
addMessage, addMessages, addNetworkable, disconnect, getBandwidth, receiveMessages, removeNetworkable, sendMessages
notifyConnectionEstablished, notifyConnectionTerminated, notifyMessageOfTheDay
void connect(java.lang.String ip, int port)
ip
- The server ip.port
- The server port.void setName(java.lang.String name)
name
- The new name.java.lang.String getName()
int getPing()
byte getId()
void notifyClientConnected(java.lang.Byte id, java.lang.String name)
id
- The client id.name
- The client name.void notifyClientDisconnected(java.lang.Byte id, java.lang.String name)
id
- The client id.name
- The client name.void notifyClientNameChanged(java.lang.Byte id, java.lang.String name)
id
- The client id.name
- The client new name.