class DatagramReceive
extends java.lang.Thread
Modifier and Type | Field and Description |
---|---|
(package private) static int |
error
Status of error.
|
(package private) java.net.DatagramPacket |
packet
UDP Packet in which to receive communication data.
|
(package private) static int |
receivedPacket
Status of packet received.
|
(package private) java.net.DatagramSocket |
socket
UDP Socket over which to communicate.
|
(package private) int |
status
Current status.
|
(package private) static int |
timedOut
Status of timed out.
|
Constructor and Description |
---|
DatagramReceive(java.net.DatagramPacket recvPacket,
java.net.DatagramSocket recvSocket)
Creates a DatagramReceive object.
|
Modifier and Type | Method and Description |
---|---|
void |
run()
Method to run thread to receive UDP packet and notify waiters.
|
(package private) int |
waitForReply(int time)
Waits for a UDP packet to be received.
|
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, yield
java.net.DatagramPacket packet
java.net.DatagramSocket socket
static final int timedOut
static final int receivedPacket
static final int error
volatile int status
DatagramReceive(java.net.DatagramPacket recvPacket, java.net.DatagramSocket recvSocket)
recvPacket
- UDP packet in which to receive communication data.recvSocket
- UDP Socket over which to communicateint waitForReply(int time)
time
- time to wait in milliseconds before timing out.public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread