|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectseda.nbio.NonblockingServerSocket
public class NonblockingServerSocket
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.)
ServerSocket
Field Summary | |
---|---|
(package private) NonblockingSocketImpl |
impl
|
Fields inherited from interface seda.nbio.Selectable |
---|
ACCEPT_READY, CONNECT_READY, READ_READY, SELECT_ERROR, WRITE_READY |
Constructor Summary | |
---|---|
NonblockingServerSocket(int port)
Create a nonblocking server socket listening on the given port. |
|
NonblockingServerSocket(int port,
int backlog)
Create a nonblocking server socket listening on the given port with the given connection backlog (the default is 511). |
|
NonblockingServerSocket(int port,
int backlog,
java.net.InetAddress bindAddr)
Create a nonblocking server socket listening on the given port, with the given connection backlog, bound to the given address. |
Method Summary | |
---|---|
NonblockingSocket |
accept()
Accept a connection on this server socket. |
void |
close()
Close the socket. |
java.net.InetAddress |
getInetAddress()
Return the address to which this socket is bound. |
int |
getLocalPort()
Return the port to which this socket is bound. |
int |
getSoTimeout()
Currently unimplemented. |
NonblockingSocket |
nbAccept()
Perform a nonblocking accept() on this socket. |
void |
setSoTimeout(int timeout)
Currently unimplemented. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
NonblockingSocketImpl impl
Constructor Detail |
---|
public NonblockingServerSocket(int port) throws java.io.IOException
java.io.IOException
public NonblockingServerSocket(int port, int backlog) throws java.io.IOException
java.io.IOException
public NonblockingServerSocket(int port, int backlog, java.net.InetAddress bindAddr) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public NonblockingSocket accept() throws java.io.IOException
java.io.IOException
public NonblockingSocket nbAccept() throws java.io.IOException
java.io.IOException
SelectSet
public java.net.InetAddress getInetAddress()
public int getLocalPort()
public void setSoTimeout(int timeout) throws java.net.SocketException
java.net.SocketException
public int getSoTimeout() throws java.net.SocketException
java.net.SocketException
public void close() throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |