public interface IWebSocketConnectionHandler
| Modifier and Type | Field and Description |
|---|---|
static int |
CLOSE_CANNOT_CONNECT
Connection could not be established in the first place.
|
static int |
CLOSE_CONNECTION_LOST
A previously established connection was lost unexpected.
|
static int |
CLOSE_INTERNAL_ERROR
Internal error.
|
static int |
CLOSE_NORMAL
Connection was closed normally.
|
static int |
CLOSE_PROTOCOL_ERROR
The connection was closed because a protocol violation
occurred.
|
static int |
CLOSE_RECONNECT
Server connection lost, scheduled reconnect
|
static int |
CLOSE_SERVER_ERROR
Server returned error while connecting
|
| Modifier and Type | Method and Description |
|---|---|
void |
onClose(int code,
java.lang.String reason)
Fired when the WebSockets connection has deceased (or could
not established in the first place).
|
void |
onConnect(ConnectionResponse response) |
void |
onMessage(byte[] payload,
boolean isBinary) |
void |
onMessage(java.lang.String payload) |
void |
onOpen()
Fired when the WebSockets connection has been established.
|
void |
onPing() |
void |
onPing(byte[] payload) |
void |
onPong() |
void |
onPong(byte[] payload) |
void |
setConnection(WebSocketConnection connection) |
static final int CLOSE_NORMAL
static final int CLOSE_CANNOT_CONNECT
static final int CLOSE_CONNECTION_LOST
static final int CLOSE_PROTOCOL_ERROR
static final int CLOSE_INTERNAL_ERROR
static final int CLOSE_SERVER_ERROR
static final int CLOSE_RECONNECT
void onConnect(ConnectionResponse response)
void onOpen()
void onClose(int code,
java.lang.String reason)
code - Close code.reason - Close reason (human-readable).void onMessage(java.lang.String payload)
void onMessage(byte[] payload,
boolean isBinary)
void onPing()
void onPing(byte[] payload)
void onPong()
void onPong(byte[] payload)
void setConnection(WebSocketConnection connection)