|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--nl.bluering.ppracing.NetClient
This class provides the functionality for playing a network game as client. It takes care of the communication with the server
| Field Summary | |
static int |
PORT
|
| Constructor Summary | |
NetClient(java.lang.String server,
Ppracing p,
java.lang.String n,
newnetwindow nw)
Creates a new client and connects to the server on port 8192 |
|
| Method Summary | |
void |
endgame()
Is called when the endgame-signal is received |
int |
getid()
|
java.lang.String[] |
getplayerlist()
|
int[] |
getplayertype()
|
void |
incircuit(java.lang.String s)
Loads the circuit send by the server |
void |
indisconnect()
Is called when the server disconnects this client |
void |
inid(int i)
Gives this client an id number |
void |
inmessage(java.lang.String s)
Is called when a message is received from the server |
void |
inmove(java.lang.String s)
Receives the current player's move from the server |
void |
inname(java.lang.String[] n)
Is called when a list of players is recieved from the server |
void |
outdisconnect()
Disconnects this client from the server |
void |
outmessage(java.lang.String s)
Sends a message to the server |
void |
outmove(int m)
Sends this clients' move to the server |
void |
outname()
Sends this clients' name to the server |
void |
showmessage(java.lang.String s)
Shows the incoming message in the chatbox of the newnetwindow |
void |
startgame()
Is called when the startgame-signal is received |
void |
stop()
Stops all in/outcoming connections |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int PORT
| Constructor Detail |
public NetClient(java.lang.String server,
Ppracing p,
java.lang.String n,
newnetwindow nw)
throws java.io.IOException
| Method Detail |
public void inid(int i)
public int getid()
public void outname()
public void inname(java.lang.String[] n)
public void outmessage(java.lang.String s)
public void inmessage(java.lang.String s)
public void outmove(int m)
public void inmove(java.lang.String s)
public void startgame()
public void endgame()
public void indisconnect()
public void outdisconnect()
public void incircuit(java.lang.String s)
public void stop()
public java.lang.String[] getplayerlist()
public int[] getplayertype()
public void showmessage(java.lang.String s)
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||