|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--SSF.OS.ProtocolSession
|
+--SSF.OS.Socket.socketMaster
A convenience protocol used to create TCP or UDP sockets, that is instances of SSF.OS.TCP.tcpSocket or SSF.OS.UDP.udpSocket, respectively.
| Field Summary | |
boolean |
DEBUG
|
static short |
EBADF
The socket is not associated with any TCP session and cannot be used any more. |
static short |
EBUSY
Attemp to write to a blocking socket while another process is writing, or attempt to read from a blocking socket while another process is reading. |
static short |
ECONNABORTED
|
static short |
ECONNREFUSED
Connection request refused by peer or ICMP notification that the destination protocol or port number is unreachable at destination. |
static short |
ECONNRESET
Connection reset by peer. |
static short |
EHOSTUNREACH
ICMP notification that destination host or net is unreachable. |
static short |
EINPROGRESS
return from connect() in a non-blocking socket when the connection cannot be completed immediately. |
static short |
EISCONN
The socket is already connected. |
static short |
ETIMEDOUT
Connection timeout. |
static short |
EWOULDBLOCK
No success in a blocking call for a non-blocking socket. |
int |
minPortNumber
First automatically assigned port number is minPortNumber+1. |
tcpSessionMaster |
tcpMaster
|
udpSessionMaster |
udpMaster
|
| Fields inherited from class SSF.OS.ProtocolSession |
name, use |
| Constructor Summary | |
socketMaster()
|
|
| Method Summary | |
void |
config(com.renesys.raceway.DML.Configuration cfg)
Configure the socket parameters. |
static java.lang.String |
errorString(int errno)
|
int |
getPortNumber()
Returns the next higher automatically assigned integer port number, beginning from minPortNumber+1. |
boolean |
push(ProtocolMessage message,
ProtocolSession fromSession)
Routine to call when a message is being sent to ("pushed into") this ProtocolSession by another ProtocolSession. |
socketAPI |
socket(ProtocolSession caller,
java.lang.String protocol)
Returns a new unconnected socket for the named protocol (tcp, udp). |
| Methods inherited from class SSF.OS.ProtocolSession |
close, closed, 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 short ECONNREFUSED
public static final short ECONNRESET
public static final short ETIMEDOUT
public static final short ECONNABORTED
public static final short EWOULDBLOCK
public static final short EISCONN
public static final short EINPROGRESS
public static final short EHOSTUNREACH
public static final short EBUSY
public static final short EBADF
public tcpSessionMaster tcpMaster
public udpSessionMaster udpMaster
public int minPortNumber
public boolean DEBUG
| Constructor Detail |
public socketMaster()
| Method Detail |
public static final java.lang.String errorString(int errno)
public void config(com.renesys.raceway.DML.Configuration cfg)
throws com.renesys.raceway.DML.configException
ProtocolSession [name socket use SSF.OS.Socket.socketMaster debug %S # if true, print verbose TCP diagnostics ]
config in interface com.renesys.raceway.DML.Configurableconfig in class ProtocolSessioncom.renesys.raceway.DML.configException
public socketAPI socket(ProtocolSession caller,
java.lang.String protocol)
throws ProtocolException
caller - protocol session instance which requests the socketprotocol - transport protocol name, which must
be either "tcp" or "udp"
ProtocolExceptionpublic int getPortNumber()
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 | |||||||||