public class ServerSocketFacadeImpl extends Object implements ServerSocketFacade
| Constructor and Description |
|---|
ServerSocketFacadeImpl(int port,
int backlog,
InetAddress bindAddress) |
| Modifier and Type | Method and Description |
|---|---|
SocketConnectionFacade |
accept()
Waits for a new incoming connection.
|
void |
close()
Unbinds and closes the server socket.
|
void |
setSocketReadTimeout(int socketReadTimeout)
Connection is dropped if it stales on read longer than the timeout.
|
public ServerSocketFacadeImpl(int port,
int backlog,
InetAddress bindAddress)
throws IOException
IOExceptionpublic SocketConnectionFacade accept() throws IOException
ServerSocketFacadeaccept in interface ServerSocketFacadeIOException - if an I/O error occurs when waiting for a connection.public void close()
throws IOException
ServerSocketFacadeclose in interface ServerSocketFacadeIOException - if the server socket cannot be closed.public void setSocketReadTimeout(int socketReadTimeout)
ServerSocketFacadesetSocketReadTimeout in interface ServerSocketFacadesocketReadTimeout - the read timeout value to be used in
milliseconds.Socket.setSoTimeout(int)Copyright © 2004–2022. All rights reserved.