ServerSocket Members

ServerSocket Members

Class Overview | This Package | All Packages

Constructors
Name Description
ServerSocket(int) Creates a server socket on a specified port.
ServerSocket(int, int) Creates a server socket and binds it to the specified local port number.
ServerSocket(int, int, InetAddress) Create a server with the specified port, listen backlog, and local IP address to bind to.

Methods
Name Description
accept() Listens for a connection to be made to this socket and accepts it.
close() Closes this socket.
getInetAddress() Returns the local address of this server socket.
getLocalPort() Returns the port on which this socket is listening.
getSoTimeout() Retrive setting for SO_TIMEOUT.
implAccept(Socket) Subclasses of ServerSocket use this method to override accept() to return their own subclass of socket.
setSocketFactory(SocketImplFactory) Sets the server socket implementation factory for the application.
setSoTimeout(int) Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds.
toString() Returns the implementation address and implementation port of this socket as a String.