|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--nl.bluering.ppracing.NetSend
This class implements the procedures for sending data from the server or a client
| Constructor Summary | |
NetSend(java.net.Socket s,
int i,
NetClient n)
Creates a new sendingplatform for a client |
|
NetSend(java.net.Socket s,
int i,
NetSClient n)
Creates a new sendingplatform for the server |
|
| Method Summary | |
void |
acknowledge()
Sends acknowledgement with ID to the client |
void |
carmove(java.lang.String s)
Sends a move to the server or players |
void |
circuit(java.lang.String s)
The server sends the circuit to the client |
void |
disconnect()
Disconnects client from server |
void |
endgame(java.lang.String s)
The server ends the current game |
void |
message(java.lang.String s)
Sends a message to the server or each player |
void |
newgame()
The server starts a new game |
void |
players(java.lang.String[] s)
Sends playerlist to each client |
void |
run()
Is called when the thread is started This function attempts to send the message 30 times, then cancelles the action |
void |
send(java.lang.String t,
java.lang.String m)
Tells this class to start sending the new message. |
void |
sendname(java.lang.String s)
Sends the clients name to the server |
void |
setid(int id)
Resets the client id to the new value |
void |
setname(java.lang.String s)
The client sends it's name to the server |
void |
start()
Function to start this thread, must be called once |
void |
stop()
Stops this thread |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public NetSend(java.net.Socket s,
int i,
NetClient n)
public NetSend(java.net.Socket s,
int i,
NetSClient n)
| Method Detail |
public void start()
public void send(java.lang.String t,
java.lang.String m)
public void stop()
public void setid(int id)
public void run()
run in interface java.lang.Runnablepublic void acknowledge()
public void disconnect()
public void players(java.lang.String[] s)
public void sendname(java.lang.String s)
public void message(java.lang.String s)
public void newgame()
public void carmove(java.lang.String s)
public void endgame(java.lang.String s)
public void setname(java.lang.String s)
public void circuit(java.lang.String s)
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||