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
IOException
public SocketConnectionFacade accept() throws IOException
ServerSocketFacade
accept
in interface ServerSocketFacade
IOException
- if an I/O error occurs when waiting for a connection.public void close() throws IOException
ServerSocketFacade
close
in interface ServerSocketFacade
IOException
- if the server socket cannot be closed.public void setSocketReadTimeout(int socketReadTimeout)
ServerSocketFacade
setSocketReadTimeout
in interface ServerSocketFacade
socketReadTimeout
- the read timeout value to be used in
milliseconds.Socket.setSoTimeout(int)
Copyright © 2004–2022. All rights reserved.