marauroa.net
Class NetworkClientManager

java.lang.Object
marauroa.net.NetworkClientManager
- public class NetworkClientManager
- extends java.lang.Object
The NetworkClientManager is in charge of sending and recieving the packages
from the network.
|
Constructor Summary |
NetworkClientManager(java.lang.String host)
Constructor that opens the socket on the marauroa_PORT and start the thread
to recieve new messages from the network. |
|
Method Summary |
void |
addMessage(Message msg)
This method add a message to be delivered to the client the message is pointed to. |
void |
finish()
This method notify the thread to finish it execution |
Message |
getMessage()
This method returns a message if it is available or null |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
socket
private java.net.DatagramSocket socket
address
private java.net.InetSocketAddress address
clientid
private int clientid
msgFactory
private MessageFactory msgFactory
pendingPackets
private java.util.Map pendingPackets
NetworkClientManager
public NetworkClientManager(java.lang.String host)
throws java.net.SocketException
- Constructor that opens the socket on the marauroa_PORT and start the thread
to recieve new messages from the network.
finish
public void finish()
- This method notify the thread to finish it execution
getMessage
public Message getMessage()
- This method returns a message if it is available or null
addMessage
public void addMessage(Message msg)
- This method add a message to be delivered to the client the message is pointed to.