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