|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.vattp.tunnel.HTTPClient
Untamed:
Field Summary | |
private Vector |
myInTCP
Incoming TCP sockets. |
private Vector |
myOutTCP
Outgoing TCP sockets. |
private ByteArrayOutputStream |
myResponses
|
private byte[] |
mySessionID
|
Constructor Summary | |
(package private) |
HTTPClient(byte[] sessionID)
|
Method Summary | |
(package private) void |
close(byte connectionID)
Close a TCP connection. |
(package private) void |
disaster(Throwable t)
Handle an error that occured while handling an error for this client. |
(package private) byte[] |
flushQueuedMsgs()
Returns the messages to be returned to the client as part of an HTTP_Session message. |
private HTTPSocketCtl |
getSocketCtl(byte connectionID)
|
(package private) void |
makeConnection(byte connectionID,
String hostPort)
Make a new outgoing TCP connection for the client. |
private void |
queueDataMsg(int connectionID,
HTTPSocketCtl ctl)
Queue a data message to be returned to the client as part of an HTTP_Session message. |
(package private) void |
queueMsg(byte[] message)
Queue a message to be returned to the client as part of an HTTP_Session message. |
(package private) void |
sendData(byte connectionID,
byte[] data)
Send data to a TCP connection. |
(package private) void |
setSendLimit(byte connectionID,
int limit)
Set send limit for a particular connection. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final Vector myInTCP
private final Vector myOutTCP
private final byte[] mySessionID
private final ByteArrayOutputStream myResponses
Constructor Detail |
HTTPClient(byte[] sessionID)
Method Detail |
void close(byte connectionID)
connectionID
- is the connectionID to close. If it is positive,
then the connection was built as an outgoing connection.
If it is negative, then it was built as an incoming one.
The value zero is invalid.void disaster(Throwable t)
byte[] flushQueuedMsgs() throws IOException
IOException
private HTTPSocketCtl getSocketCtl(byte connectionID)
void makeConnection(byte connectionID, String hostPort)
connectionID
- is the one byte connection ID, a positive number.hostPort
- is the host IP/DNS name : port number.private void queueDataMsg(int connectionID, HTTPSocketCtl ctl) throws IOException
IOException
void queueMsg(byte[] message)
message
- is the message to queue.void sendData(byte connectionID, byte[] data)
data
- is the byte array to send.void setSendLimit(byte connectionID, int limit)
limit
- is the new send limit.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |