|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Communication
The Communication
class takes care of the server-client
UDP-Packet-transmission. This one is called by each Player
-class.
Player
Field Summary | |
private java.net.DatagramSocket |
datagramSocket
initializes a new Datagram Socket-class |
private java.net.InetAddress |
serverIP
this java-own class represents an Internet Protocol-address |
private int |
serverPort
|
Constructor Summary | |
Communication(java.lang.String serverName,
int serverPort)
Constructor of another Communication instance; handles
transfer errors.Author: Wini Appl |
Method Summary | |
java.lang.String |
receive()
The Receive -method fetches data from the server and passes
it on to the Worldmodel .Author: Wini Appl |
void |
send(java.lang.String input)
The Send -method converts any incoming input-string into a
byte-array and sends it to the server.Author: Wini Appl |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.net.DatagramSocket datagramSocket
private java.net.InetAddress serverIP
private int serverPort
Constructor Detail |
public Communication(java.lang.String serverName, int serverPort)
Communication
instance; handles
transfer errors.Author: Wini Appl
serverName
- Name of the RoboCupServer one wants to connect to.serverPort
- Portnumber of the RoboCupServer one wants to connect to.Method Detail |
public void send(java.lang.String input)
Send
-method converts any incoming input-string into a
byte-array and sends it to the server.Author: Wini Appl
input
- sends the parsed String to aboves ServerCommunication(String serverName, int serverPort)
,
Parser
public java.lang.String receive()
Receive
-method fetches data from the server and passes
it on to the Worldmodel
.Author: Wini Appl
Parser
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |