| java.lang.Object seda.sandStorm.lib.aSocket.ATcpServerSocket
ATcpServerSocket | public class ATcpServerSocket (Code) | | This class represents an asynchronous server socket.
An application creates an ATcpServerSocket to listen for incoming
TCP connections on a given port; when a connection is received,
an ATcpConnection object is pushed to the SinkIF associated with
the ATcpServerSocket. The ATcpConnection is then used for communication.
author: Matt Welsh See Also: ATcpConnection |
Method Summary | |
public void | close() Asynchronously close this server socket. | public int | getLocalPort() Return the local port for this socket. | public int | getPort() Return the port that this socket is listening on. | public void | resumeAccept() Request that this server socket resume accepting new connections. | public void | suspendAccept() Request that this server socket stop accepting new connections. |
serverPort | int serverPort(Code) | | |
ATcpServerSocket | public ATcpServerSocket(int serverPort, SinkIF compQ) throws IOException(Code) | | Open a server socket listening on the given port. When a connection
arrives, an ATcpConnection will be posted to the given compQ.
If the server socket dies, an ATcpServerSocketDeadEvent will be
posted instead.
|
ATcpServerSocket | public ATcpServerSocket(int serverPort, SinkIF compQ, int writeClogThreshold) throws IOException(Code) | | Open a server socket listening on the given port. When a connection
arrives, an ATcpConnection will be posted to the given compQ.
If the server socket dies, an ATcpServerSocketDeadEvent will be
posted instead.
Parameters: writeClogThreshold - The maximum number of outstanding write requests to a connection established using this socket before aSinkCloggedEvent is pushed onto the completion queue for thatconnection. The default value is -1, which indicates that noSinkCloggedEvents will be generated. |
ATcpServerSocket | protected ATcpServerSocket()(Code) | | |
close | public void close()(Code) | | Asynchronously close this server socket. An ATcpServerSocketClosedEvent
will be posted to the completion queue associated with this
server socket when the close completes.
|
getLocalPort | public int getLocalPort()(Code) | | Return the local port for this socket. Returns -1 if no local port
has yet been established.
|
getPort | public int getPort()(Code) | | Return the port that this socket is listening on.
|
resumeAccept | public void resumeAccept()(Code) | | Request that this server socket resume accepting new connections.
This request will not take effect immediately.
|
suspendAccept | public void suspendAccept()(Code) | | Request that this server socket stop accepting new connections.
This request will not take effect immediately.
|
|
|