Class Communication

java.lang.Object
  |
  +--Communication

public class Communication
extends java.lang.Object

The class Communication handles UDP network traffic from/to the rcssserver.


Constructor Summary
Communication(java.lang.String serverName, int serverPort)
          Creates a new Communication instance.
 
Method Summary
 java.lang.String receive()
          Receives a message from the server
 void send(java.lang.String message)
          Sends a String to the server
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Communication

public Communication(java.lang.String serverName,
                     int serverPort)
Creates a new Communication instance.
Parameters:
serverName - The address of the server specified by its name or its IP address
serverPort - The port of the server
Method Detail

send

public void send(java.lang.String message)
Sends a String to the server
Parameters:
message - a String value containing the message which has to be sent to the server.

receive

public java.lang.String receive()
Receives a message from the server
Returns:
a String containing the message read from the socket