public class ServerSocket extends Object
Constructor and Description |
---|
ServerSocket() |
ServerSocket(int port) |
ServerSocket(int port,
int backlog) |
ServerSocket(int port,
int backlog,
InetAddress local) |
Modifier and Type | Method and Description |
---|---|
Socket |
accept() |
void |
close() |
InetAddress |
getInetAddress() |
int |
getLocalPort() |
boolean |
getReuseAddress() |
int |
getSoTimeout() |
protected void |
implAccept(Socket s) |
void |
setReuseAddress(boolean on) |
static void |
setSocketFactory(SocketImplFactory fact) |
void |
setSoTimeout(int timeout) |
String |
toString()
Default String representation: overriden by many classes.
|
public ServerSocket() throws IOException
IOException
public ServerSocket(int port) throws IOException
IOException
public ServerSocket(int port, int backlog) throws IOException
IOException
public ServerSocket(int port, int backlog, InetAddress local) throws IOException
IOException
public Socket accept() throws IOException
IOException
protected final void implAccept(Socket s) throws IOException
IOException
public void close() throws IOException
IOException
public InetAddress getInetAddress()
public int getLocalPort()
public int getSoTimeout() throws IOException
IOException
public void setSoTimeout(int timeout) throws SocketException
SocketException
public void setReuseAddress(boolean on) throws IOException
IOException
public boolean getReuseAddress() throws IOException
IOException
public static void setSocketFactory(SocketImplFactory fact) throws IOException
IOException