public class Connection
extends java.lang.Thread
Constructor and Description |
---|
Connection(java.net.Socket activeSocket,
Daemon masterDaemon)
default constructor to create a Connection
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getGMTString(java.util.Date d) |
java.lang.String |
getIPAddressString() |
void |
run()
The thread runs here.
|
protected void |
sendString(byte[] bytes) |
protected void |
sendString(java.lang.Object string)
Sends a string to the client
|
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
public Connection(java.net.Socket activeSocket, Daemon masterDaemon) throws java.io.IOException
activeSocket
- the socket on which the connection was madeemasterDaemon
- the daemon that spanwed this connectionjava.io.IOException
public java.lang.String getIPAddressString()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
protected void sendString(java.lang.Object string) throws java.io.IOException
string
- java.io.IOException
protected void sendString(byte[] bytes)
public static java.lang.String getGMTString(java.util.Date d)