private static class UDPIoTest.ServerMainThread
extends java.lang.Thread
| Modifier and Type | Field and Description |
|---|---|
private boolean |
ready
Stores if this thread is ready for accepting connections.
|
private byte[] |
receiveData
Array for receiving data.
|
private byte[] |
sendData
Array for sending data.
|
private java.net.DatagramSocket |
serverSocket
Stores the underlying server socket.
|
| Constructor and Description |
|---|
ServerMainThread(java.net.DatagramSocket serverSocket)
Creates a new server thread on the given socket.
|
| Modifier and Type | Method and Description |
|---|---|
void |
run()
Executes the thread, i.e. waits for incoming connections.
|
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, yieldprivate java.net.DatagramSocket serverSocket
private boolean ready
private byte[] sendData
private byte[] receiveData
public ServerMainThread(java.net.DatagramSocket serverSocket)
serverSocket - the socket used for accepting connectionspublic void run()
run in interface java.lang.Runnablerun in class java.lang.Thread