| java.lang.Object seda.nbio.NonblockingServerSocket
NonblockingServerSocket | public class NonblockingServerSocket implements Selectable(Code) | | A NonblockingServerSocket implements a nonblocking variant of
java.net.ServerSocket. (Ideally it would simply extend the latter
class, but ServerSocket does not contain an appropriate public
constructor which would make that feasible.)
See Also: java.net.ServerSocket |
Constructor Summary | |
public | NonblockingServerSocket(int port) Create a nonblocking server socket listening on the given port. | public | NonblockingServerSocket(int port, int backlog) Create a nonblocking server socket listening on the given port with
the given connection backlog (the default is 511). | public | NonblockingServerSocket(int port, int backlog, InetAddress bindAddr) Create a nonblocking server socket listening on the given port,
with the given connection backlog, bound to the given address. |
NonblockingServerSocket | public NonblockingServerSocket(int port) throws IOException(Code) | | Create a nonblocking server socket listening on the given port.
|
NonblockingServerSocket | public NonblockingServerSocket(int port, int backlog) throws IOException(Code) | | Create a nonblocking server socket listening on the given port with
the given connection backlog (the default is 511).
|
NonblockingServerSocket | public NonblockingServerSocket(int port, int backlog, InetAddress bindAddr) throws IOException(Code) | | Create a nonblocking server socket listening on the given port,
with the given connection backlog, bound to the given address.
This is useful if you wish to bind the socket to an address other
than INADDR_ANY.
|
accept | public NonblockingSocket accept() throws IOException(Code) | | Accept a connection on this server socket. This is a blocking
operation.
A NonblockingSocket corresponding to the new connection. |
getInetAddress | public InetAddress getInetAddress()(Code) | | Return the address to which this socket is bound.
|
getLocalPort | public int getLocalPort()(Code) | | Return the port to which this socket is bound.
|
nbAccept | public synchronized NonblockingSocket nbAccept() throws IOException(Code) | | Perform a nonblocking accept() on this socket. Returns null if no
connection was established. Selecting this socket for ACCEPT_READY
will allow you to determine if nbAccept() will return a new connection.
See Also: SelectSet |
setSoTimeout | public synchronized void setSoTimeout(int timeout) throws SocketException(Code) | | Currently unimplemented.
|
|
|