(Ideally it would simply extend the latter class, but ServerSocket does not contain an appropriate public constructor which would make that feasible.)
Public Member Functions | |
NonblockingServerSocket (int port) throws IOException | |
Create a nonblocking server socket listening on the given port. | |
NonblockingServerSocket (int port, int backlog) throws IOException | |
Create a nonblocking server socket listening on the given port with the given connection backlog (the default is 511). | |
NonblockingServerSocket (int port, int backlog, InetAddress bindAddr) throws IOException | |
Create a nonblocking server socket listening on the given port, with the given connection backlog, bound to the given address. | |
NonblockingSocket | accept () throws IOException |
Accept a connection on this server socket. | |
synchronized NonblockingSocket | nbAccept () throws IOException |
Perform a nonblocking accept() on this socket. | |
InetAddress | getInetAddress () |
Return the address to which this socket is bound. | |
int | getLocalPort () |
Return the port to which this socket is bound. | |
synchronized void | setSoTimeout (int timeout) throws SocketException |
Currently unimplemented. | |
synchronized int | getSoTimeout () throws SocketException |
Currently unimplemented. | |
synchronized void | close () throws IOException |
Close the socket. | |
String | toString () |
Static Package Functions | |
[static initializer] | |
Package Attributes | |
NonblockingSocketImpl | impl |
Private Attributes | |
NonblockingSocket | accept_tmp = null |
Static Private Attributes | |
static final boolean | DEBUG = false |
static final int | DEFAULT_LISTEN_BACKLOG = 511 |
seda.nbio.NonblockingServerSocket.NonblockingServerSocket | ( | int | port | ) | throws IOException |
Create a nonblocking server socket listening on the given port.
seda.nbio.NonblockingServerSocket.NonblockingServerSocket | ( | int | port, | |
int | backlog | |||
) | throws IOException |
Create a nonblocking server socket listening on the given port with the given connection backlog (the default is 511).
seda.nbio.NonblockingServerSocket.NonblockingServerSocket | ( | int | port, | |
int | backlog, | |||
InetAddress | bindAddr | |||
) | throws IOException |
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.
seda.nbio.NonblockingServerSocket.[static initializer] | ( | ) | [static, package] |
NonblockingSocket seda.nbio.NonblockingServerSocket.accept | ( | ) | throws IOException |
Accept a connection on this server socket.
This is a blocking operation.
synchronized NonblockingSocket seda.nbio.NonblockingServerSocket.nbAccept | ( | ) | throws IOException |
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.
InetAddress seda.nbio.NonblockingServerSocket.getInetAddress | ( | ) |
Return the address to which this socket is bound.
int seda.nbio.NonblockingServerSocket.getLocalPort | ( | ) |
Return the port to which this socket is bound.
synchronized void seda.nbio.NonblockingServerSocket.setSoTimeout | ( | int | timeout | ) | throws SocketException |
Currently unimplemented.
synchronized int seda.nbio.NonblockingServerSocket.getSoTimeout | ( | ) | throws SocketException |
Currently unimplemented.
synchronized void seda.nbio.NonblockingServerSocket.close | ( | ) | throws IOException |
Close the socket.
String seda.nbio.NonblockingServerSocket.toString | ( | ) |
final boolean seda.nbio.NonblockingServerSocket.DEBUG = false [static, private] |
final int seda.nbio.NonblockingServerSocket.DEFAULT_LISTEN_BACKLOG = 511 [static, private] |
NonblockingSocket seda.nbio.NonblockingServerSocket.accept_tmp = null [private] |