public class UdpPacketReceiver extends java.lang.Thread implements IPacketReceiver
| Constructor and Description |
|---|
UdpPacketReceiver(java.net.DatagramSocket socket)
Instantiates a new udp packet receiver.
|
UdpPacketReceiver(int port)
Instantiates a new udp packet receiver.
|
| Modifier and Type | Method and Description |
|---|---|
void |
registerForIncomingPackets(IIncomingPacketObserver observer)
Register for incoming packets.
|
void |
run() |
void |
terminate() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitstartpublic UdpPacketReceiver(java.net.DatagramSocket socket)
socket - the socketpublic UdpPacketReceiver(int port)
port - the portpublic void registerForIncomingPackets(IIncomingPacketObserver observer)
IPacketReceiverregisterForIncomingPackets in interface IPacketReceiverobserver - the observerpublic void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void terminate()
terminate in interface ILaunchable