public class RoboRallyClient
extends java.lang.Object
| Constructor and Description | 
|---|
RoboRallyClient(RoboRallyUI wrapper)
Instantiates a new Robo Rally client 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
connect(java.lang.String ipAddress,
       int serverPort)
Connects to a Robo Rally server 
 | 
java.util.List<java.net.InetAddress> | 
getLanServers(int UDPPort)
Gets a list of addresses of local Robo Rally servers 
 | 
RequestState | 
getLastRequestState()
Gets the state of the lastly sent request 
 | 
void | 
sendElement(java.lang.Object object)
Sends something to the server 
 | 
public RoboRallyClient(RoboRallyUI wrapper)
wrapper - The Robo Rally UI to be usedpublic void connect(java.lang.String ipAddress,
                    int serverPort)
             throws java.io.IOException
ipAddress - The ip address of the server to joinserverPort - The port the server is hosted onjava.io.IOException - If the server cannot be connected topublic java.util.List<java.net.InetAddress> getLanServers(int UDPPort)
UDPPort - The port used by the game for UDP requestspublic RequestState getLastRequestState()
public void sendElement(java.lang.Object object)
object - The object to send to the server