java.net.ServerSocket (class) |
Constructors: |
ServerSocket(int port);
ServerSocket(int port, int backLog);
ServerSocket(int port, int backLog, InetAddress bindAddr);
|
General Description: |
This specialized TCP socket creates a listening, server socket. |
Parent Class: |
Object Static Methods setSocketFactory(SocketImplFactory fac); Set the Socket implementation factory. |
Methods |
Socket accept(); |
Accept a client connection and return a Socket. |
void close(); |
Close the socket. |
InetAddress getInetAddress(); |
Get the local address the socket is connected to. |
int getLocalPort(); |
Get the local port. |
int getSoTimeout(); |
|
void setSoTimeout(int timeout); |
Get/set the timeout for I/O. If enabled, reading the pipe aborts after specified time. |
Exceptions Thrown |
IOException, SocketException
|
|