Libraries anvil net ServerSocket

class ServerSocket
extends anvil.lang.object
A server socket waits for requests to come in over the network.

Constructor
ServerSocket(int port)
ServerSocket(int port, object backlog, object addr)
Creates a new server socket to given port binding it to optional addr with given backlog for incoming connections


Methods

Socket accept()
Listens for a connection to be made to this socket and accepts it. The method blocks until a connection is made.
Throws InterruptedIO -  If operation was interrupted
IOError -  If an IO error occurs

boolean close()
Closes this socket.
Throws IOError -  If an IO error occurs

InetAddress getAddress()
Returns the IP address to which this socket has been bound to.

int getPort()
Returns the port to which this socket has been bound to.

int getSoTimeout()
Returns setting for SO_TIMEOUT. 0 returns implies that the option is disabled (i.e., timeout of infinity).
Throws IOError -  If an IO error occurs

boolean setSoTimeout(int timeout)
Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds.
Throws IOError -  If an IO error occurs