|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| Method Summary | |
void |
abort()
Abort a connection. |
void |
accept(socketAPI[] new_socket,
Continuation caller)
For TCP, accept an established connection (after three-way handshake) from the pending connection request queue. |
void |
bind(int local_ip,
int local_port)
Bind the local IP address and port number to the socket. |
void |
close(Continuation caller)
Close a connection. |
void |
connect(int remote_ip,
int remote_port,
Continuation caller)
For TCP, active open a connection to a remote host (blocking). |
void |
listen(int queue_limit)
Set up the socket to accept incoming connection requests (TCP) or incoming datagrams (UDP) on the port bound to the socket. |
void |
read(byte[] buf,
int nbytes,
Continuation caller)
Read the data received by socket and write them into user-defined byte array. |
void |
read(int nbytes,
Continuation caller)
Read pseudo-data received by the socket. |
void |
read(java.lang.Object[] obj,
int nbytes,
Continuation caller)
Read a data object received by the socket. |
void |
write(byte[] buf,
int nbytes,
Continuation caller)
Write data from a byte array to the socket. |
void |
write(int nbytes,
Continuation caller)
Write simulated pseudo-data to the socket. |
void |
write(java.lang.Object[] obj,
int nbytes,
Continuation caller)
Write a concrete data object to the socket. |
| Method Detail |
public void bind(int local_ip,
int local_port)
local_ip - local IP addresslocal_port - local port numberpublic void listen(int queue_limit)
queue_limit - For tcpSocket, specifies the maximum number of connection
requests pending accept. Ignored by udpSocket.
public void connect(int remote_ip,
int remote_port,
Continuation caller)
throws ProtocolException
For UDP, set up a UDP session for writing (non-blocking).
remote_ip - remote IP addressremote_port - remote port numbercaller - user-defined Continuation specifying the actions
to be taken when a connection is either successfully
established or an error is signalled.
ProtocolException
public void accept(socketAPI[] new_socket,
Continuation caller)
throws ProtocolException
Do not use with UDP sockets.
new_socket - one-element array that will contain the new connected
socket when Continuation returns successfully.caller - user-defined Continuation specifying the actions
to be taken when a connection is either successfully
accepted or an error is signalled.
ProtocolException
public void write(java.lang.Object[] obj,
int nbytes,
Continuation caller)
obj - user-defined array whose first element obj[0] will be sentnbytes - nominal size (in bytes) of the data object that defines
the transmitted payload sizecaller - user-defined Continuation specifying the actions
to be taken when either nbytes of (virtual) data is successfully
written or an error is signalled.
public void write(byte[] buf,
int nbytes,
Continuation caller)
nbytes - size of data to be transmittedcaller - user-defined Continuation specifying the actions
to be taken when either nbytes of data is successfully
written or an error is signalled.
public void write(int nbytes,
Continuation caller)
nbytes - number of bytes of pseudo-data that defines the
transmitted payload sizecaller - user-defined Continuation specifying the actions
to be taken when either nbytes of data is successfully
written or an error is signalled.
public void read(byte[] buf,
int nbytes,
Continuation caller)
nbytes - expected received data sizecaller - user-defined Continuation specifying the actions
to be taken when either all data is read successfully
or an error is signalled.
public void read(java.lang.Object[] obj,
int nbytes,
Continuation caller)
obj - user-defined array whose first element obj[0] will
contain the data object if read is successfulnbytes - expected number of received data bytescaller - user-defined Continuation specifying the actions
to be taken when either all data is read successfully
or an error is signalled.
public void read(int nbytes,
Continuation caller)
nbytes - expected number of bytes of received pseudo-datacaller - user-defined Continuation specifying the actions
to be taken when either all data is read successfully
or an error is signalled.public void abort()
public void close(Continuation caller)
throws ProtocolException
caller - the user defined Continuation class which defines the
action should be taken when connection is either successfully
closed or an error is signalled.
ProtocolException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||