Represents a server socket: a socket open on the current host that accepts incoming connections from other hosts.
This supports synchronous and asynchronous modes of operations.
The server socket is bound immediately to the specified
address (or to every local network interface if not set),
but it will only accept incoming connections when you
call accept()
or acceptAsync()
.
New server sockets are created with newServerSocket()
.
newServerSocket()
no type hierarchy
no supertypes hierarchy
no subtypes hierarchy
Attributes | |
localAddress | Source Codeshared formal SocketAddress localAddress Returns the local address this server socket is listening on. |
Inherited Attributes |
Attributes inherited from: Object |
Methods | |
accept | Source Codeshared formal Socket accept() Accepts an incoming connection and return its
associated |
acceptAsync | Source Codeshared formal void acceptAsync(Selector selector, Boolean accept(Socket socket)) |
close | Source Codeshared formal void close() Closes this server socket. |
Inherited Methods |
Methods inherited from: Object |