|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectpacketNetworking.Communicator
packetNetworking.Client
public class Client
Client class. This class communicates with a single server given by the connected address and portnr Class inherits streams from the communicator class, but uses only one output and one inputstream
Field Summary | |
---|---|
boolean |
connected
Boolean to check whether the client is connected or not |
Constructor Summary | |
---|---|
Client(java.lang.Object address,
int portnr)
|
Method Summary | |
---|---|
void |
Connect(java.lang.Object address,
int portnr)
Connects to the server |
protected void |
hasConnected()
Called after connected to the server. |
void |
Listen()
Listens for messages from the server. |
void |
ProcessPacket(Packet pck)
Processes the ping packet only. |
void |
Reconnect()
Reconnects to the server if the connection breaks down |
void |
Talk(Packet pck)
Sends a message to the server |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public boolean connected
Constructor Detail |
---|
public Client(java.lang.Object address, int portnr)
address
- portnr
- Method Detail |
---|
public void Connect(java.lang.Object address, int portnr)
address
- portnr
- public void Reconnect()
public void ProcessPacket(Packet pck)
command
- public void Talk(Packet pck)
Talk
in class Communicator
command
- public void Listen()
protected void hasConnected()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |