|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--SSF.OS.ProtocolSession
|
+--SSF.OS.TCP.test.tcpClientSession
A simple prototype class executing one TCP client-server session; it is instantiated by SSF.OS.TCP.test.tcpClient.
| Field Summary | |
Continuation |
clientCont
client's Continuation for this session |
static int |
CLOSED
|
static int |
CLOSING
|
static int |
CONNECTING
|
int |
fileSize
requested file size |
int |
id
client-assigned session id |
Host |
localHost
Host entity where this pseudo-protocol is installed |
tcpClient |
owner
client who created this session |
static int |
READING
|
static int |
REQUESTING
|
int |
requestSize
size (in bytes) of request datagram sent from client to server |
socketAPI |
sd
local socket used by this session |
boolean |
showDebug
print out debug information |
boolean |
showReport
print out summary session report |
int |
state
current session state |
| Fields inherited from class SSF.OS.ProtocolSession |
name, use |
| Constructor Summary | |
tcpClientSession(tcpClient client,
int sessid,
tcpClient.serverData serv,
int file_size)
Constructors |
|
| Method Summary | |
void |
begin(Continuation caller)
Class Methods |
void |
clientDebug(int errno,
java.lang.String str)
preamble to client-side-only diagnostics |
boolean |
push(ProtocolMessage message,
ProtocolSession fromSession)
Routine to call when a message is being sent to ("pushed into") this ProtocolSession by another ProtocolSession. |
void |
sessionReport(int errno,
java.lang.String str)
preamble to end2end session diagnostics |
static java.lang.String |
stateString(int s)
|
| Methods inherited from class SSF.OS.ProtocolSession |
close, closed, config, debugIdentifier, inGraph, init, open, opened, pushAfterDelay, pushAfterDelayFailed, setGraph, version |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int CLOSED
public static final int CONNECTING
public static final int REQUESTING
public static final int READING
public static final int CLOSING
public tcpClient owner
public int id
public int state
public Continuation clientCont
public boolean showDebug
public boolean showReport
public int requestSize
public int fileSize
public Host localHost
public socketAPI sd
| Constructor Detail |
public tcpClientSession(tcpClient client,
int sessid,
tcpClient.serverData serv,
int file_size)
| Method Detail |
public static final java.lang.String stateString(int s)
public void begin(Continuation caller)
public void clientDebug(int errno,
java.lang.String str)
public void sessionReport(int errno,
java.lang.String str)
public boolean push(ProtocolMessage message,
ProtocolSession fromSession)
throws ProtocolException
ProtocolSessionIf you desire "safe" interaction with other CPU activities, even though your push() consumes no measurable/modelable CPU cycles, define the "cpudelay true" attribute for the ProtocolGraph and use pushAfterDelay(message,fromSession,0.0). This will guarantee proper ordering; that is, the framework will wait until the CPU is free before proceeding with the requested push().
push in class ProtocolSessionProtocolException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||