net.vattp.tunnel
Class HTTPSocketCtl
java.lang.Object
|
+--java.lang.Thread
|
+--net.vattp.tunnel.HTTPSocketCtl
- All Implemented Interfaces:
- Runnable
- public class HTTPSocketCtl
- extends Thread
Untamed: The class which controls an individual TCP socket.
- Author:
- Bill Frantz
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
SENDLIMIT
private static final int SENDLIMIT
myLock
private final Object myLock
myClient
private final HTTPClient myClient
myConnectionID
private final byte myConnectionID
myHostPort
private final String myHostPort
mySocket
private Socket mySocket
myInputStream
private InputStream myInputStream
myOutputStream
private OutputStream myOutputStream
myMySendLimit
private int myMySendLimit
isNeedingSendLimitUpdate
private boolean isNeedingSendLimitUpdate
myHisSendLimit
private int myHisSendLimit
myOutputQueue
private final SynchQueue myOutputQueue
HTTPSocketCtl
HTTPSocketCtl(String hostPort,
HTTPClient client,
byte connectionID)
close
void close()
getHisSendLimit
byte[] getHisSendLimit()
- Get the value for the send limit to be sent to the client or null
- Returns:
- is a two byte array with the value of the send limit if it
should be updated, or null if there is no change.
getIncoming
byte[] getIncoming()
makeSessionMsg
private byte[] makeSessionMsg(byte msgID,
String reason)
throws IOException
IOException
run
public void run()
- Enabled:
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
- See Also:
java.lang.Thread#start()
,
java.lang.Thread#stop()
,
java.lang.Thread#Thread(java.lang.ThreadGroup,
java.lang.Runnable, java.lang.String)
,
java.lang.Runnable#run()
sendData
void sendData(byte[] data)
setSendLimit
void setSendLimit(int limit)
comments?