(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 |
|
Create a nonblocking server socket listening on the given port.
|
|
Create a nonblocking server socket listening on the given port with the given connection backlog (the default is 511).
|
|
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 a connection on this server socket. This is a blocking operation.
|
|
Close the socket.
|
|
Return the address to which this socket is bound.
|
|
Return the port to which this socket is bound.
|
|
Currently unimplemented.
|
|
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.
|
|
Currently unimplemented.
|
|
|
|
|
|
|
|
|
|
|