monrovia.client.protocol
Class UdpReceiver
java.lang.Object
|
+--java.lang.Thread
|
+--monrovia.client.protocol.UdpReceiver
- All Implemented Interfaces:
- java.lang.Runnable
- public class UdpReceiver
- extends java.lang.Thread
UdpReceiver is the thread listening for udp messages from the server
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Method Summary |
void |
run()
the listener implementation |
int |
setData(byte[] pBytes)
setData is the tcp side implementation of the monrovia protocol |
Methods inherited from class java.lang.Thread |
activeCount, currentThread, getPriority, isAlive, join, setPriority, sleep, start, toString, yield |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
mConnectionOpen
public boolean mConnectionOpen
UdpReceiver
public UdpReceiver(javax.microedition.io.DatagramConnection pDatagramConnection,
ClientProtocolHandler pProtocolHandler)
- Constructor
- Parameters:
pDatagramConnection
- the udpsocket/"connection"pProtocolHandler
- the handler for the recieved udp messages
UdpReceiver
public UdpReceiver(ClientProtocolHandler pProtocolHandler)
- Constructor
- Parameters:
pProtocolHandler
- the handler for the recieved messages
run
public void run()
- the listener implementation
- Overrides:
run
in class java.lang.Thread
setData
public int setData(byte[] pBytes)
- setData is the tcp side implementation of the monrovia protocol
- Parameters:
pBytes
- the bytes of the packet to interpret- Returns:
- 0 if the packet contained no control signals,
otherwise tcp opcodes