WebSocketListenerWebSocketClient, WebSocketServerpublic abstract class AbstractWebSocket extends WebSocketAdapter
| Constructor | Description |
|---|---|
AbstractWebSocket() |
| Modifier and Type | Method | Description |
|---|---|---|
int |
getConnectionLostTimeout() |
Get the interval checking for lost connections
Default is 60 seconds
|
protected abstract java.util.Collection<WebSocket> |
getConnections() |
Getter to get all the currently available connections
|
boolean |
isReuseAddr() |
Tests Tests if SO_REUSEADDR is enabled.
|
boolean |
isTcpNoDelay() |
Tests if TCP_NODELAY is enabled.
|
void |
setConnectionLostTimeout(int connectionLostTimeout) |
Setter for the interval checking for lost connections
A value lower or equal 0 results in the check to be deactivated
|
void |
setReuseAddr(boolean reuseAddr) |
Setter for soReuseAddr
|
void |
setTcpNoDelay(boolean tcpNoDelay) |
Setter for tcpNoDelay
|
protected void |
startConnectionLostTimer() |
Start the connection lost timer
|
protected void |
stopConnectionLostTimer() |
Stop the connection lost timer
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonWebsocketHandshakeReceivedAsClient, onWebsocketHandshakeReceivedAsServer, onWebsocketHandshakeSentAsClient, onWebsocketMessageFragment, onWebsocketPing, onWebsocketPonggetLocalSocketAddress, getRemoteSocketAddress, onWebsocketClose, onWebsocketCloseInitiated, onWebsocketClosing, onWebsocketError, onWebsocketMessage, onWebsocketMessage, onWebsocketOpen, onWriteDemandpublic int getConnectionLostTimeout()
public void setConnectionLostTimeout(int connectionLostTimeout)
connectionLostTimeout - the interval in secondsprotected void stopConnectionLostTimer()
protected void startConnectionLostTimer()
protected abstract java.util.Collection<WebSocket> getConnections()
public boolean isTcpNoDelay()
public void setTcpNoDelay(boolean tcpNoDelay)
Enable/disable TCP_NODELAY (disable/enable Nagle's algorithm) for new connections
tcpNoDelay - true to enable TCP_NODELAY, false to disable.public boolean isReuseAddr()
public void setReuseAddr(boolean reuseAddr)
Enable/disable SO_REUSEADDR for the socket
reuseAddr - whether to enable or disable SO_REUSEADDR