Modifier and Type | Method and Description |
---|---|
static WebSocketFrame |
WebSocketFrame.createBinaryFrame(byte[] payload)
Create a binary frame.
|
static WebSocketFrame |
WebSocketFrame.createCloseFrame()
Create a close frame.
|
static WebSocketFrame |
WebSocketFrame.createCloseFrame(int closeCode)
Create a close frame.
|
static WebSocketFrame |
WebSocketFrame.createCloseFrame(int closeCode,
String reason)
Create a close frame.
|
static WebSocketFrame |
WebSocketFrame.createContinuationFrame()
Create a continuation frame.
|
static WebSocketFrame |
WebSocketFrame.createContinuationFrame(byte[] payload)
Create a continuation frame.
|
static WebSocketFrame |
WebSocketFrame.createContinuationFrame(String payload)
Create a continuation frame.
|
static WebSocketFrame |
WebSocketFrame.createPingFrame()
Create a ping frame.
|
static WebSocketFrame |
WebSocketFrame.createPingFrame(byte[] payload)
Create a ping frame.
|
static WebSocketFrame |
WebSocketFrame.createPingFrame(String payload)
Create a ping frame.
|
static WebSocketFrame |
WebSocketFrame.createPongFrame()
Create a pong frame.
|
static WebSocketFrame |
WebSocketFrame.createPongFrame(byte[] payload)
Create a pong frame.
|
static WebSocketFrame |
WebSocketFrame.createPongFrame(String payload)
Create a pong frame.
|
static WebSocketFrame |
WebSocketFrame.createTextFrame(String payload)
Create a text frame.
|
WebSocketFrame |
WebSocketFrame.setCloseFramePayload(int closeCode,
String reason)
Set the payload that conforms to the payload format of close frames.
|
WebSocketFrame |
WebSocketFrame.setFin(boolean fin)
Set the value of FIN bit.
|
WebSocketFrame |
WebSocketFrame.setOpcode(int opcode)
Set the opcode
|
WebSocketFrame |
WebSocketFrame.setPayload(byte[] payload)
Set the unmasked payload.
|
WebSocketFrame |
WebSocketFrame.setPayload(String payload)
Set the payload.
|
WebSocketFrame |
WebSocketFrame.setRsv1(boolean rsv1)
Set the value of RSV1 bit.
|
WebSocketFrame |
WebSocketFrame.setRsv2(boolean rsv2)
Set the value of RSV2 bit.
|
WebSocketFrame |
WebSocketFrame.setRsv3(boolean rsv3)
Set the value of RSV3 bit.
|
Modifier and Type | Method and Description |
---|---|
void |
WebSocketAdapter.onBinaryFrame(WebSocket websocket,
WebSocketFrame frame) |
void |
WebSocketListener.onBinaryFrame(WebSocket websocket,
WebSocketFrame frame)
Called when a binary frame (opcode = 0x2) was received.
|
void |
WebSocketAdapter.onCloseFrame(WebSocket websocket,
WebSocketFrame frame) |
void |
WebSocketListener.onCloseFrame(WebSocket websocket,
WebSocketFrame frame)
Called when a close frame (opcode = 0x8) was received.
|
void |
WebSocketAdapter.onContinuationFrame(WebSocket websocket,
WebSocketFrame frame) |
void |
WebSocketListener.onContinuationFrame(WebSocket websocket,
WebSocketFrame frame)
Called when a continuation frame (opcode = 0x0) was received.
|
void |
WebSocketAdapter.onDisconnected(WebSocket websocket,
WebSocketFrame serverCloseFrame,
WebSocketFrame clientCloseFrame,
boolean closedByServer) |
void |
WebSocketListener.onDisconnected(WebSocket websocket,
WebSocketFrame serverCloseFrame,
WebSocketFrame clientCloseFrame,
boolean closedByServer)
Called after the WebSocket connection was closed.
|
void |
WebSocketAdapter.onFrame(WebSocket websocket,
WebSocketFrame frame) |
void |
WebSocketListener.onFrame(WebSocket websocket,
WebSocketFrame frame)
Called when a frame was received.
|
void |
WebSocketAdapter.onFrameError(WebSocket websocket,
WebSocketException cause,
WebSocketFrame frame) |
void |
WebSocketListener.onFrameError(WebSocket websocket,
WebSocketException cause,
WebSocketFrame frame)
Called when a WebSocket frame failed to be read from the WebSocket.
|
void |
WebSocketAdapter.onFrameSent(WebSocket websocket,
WebSocketFrame frame) |
void |
WebSocketListener.onFrameSent(WebSocket websocket,
WebSocketFrame frame)
Called when a WebSocket frame was sent to the server
(but not flushed yet).
|
void |
WebSocketAdapter.onFrameUnsent(WebSocket websocket,
WebSocketFrame frame) |
void |
WebSocketListener.onFrameUnsent(WebSocket websocket,
WebSocketFrame frame)
Called when a WebSocket frame was not sent to the server
because a close frame has already been sent.
|
void |
WebSocketAdapter.onPingFrame(WebSocket websocket,
WebSocketFrame frame) |
void |
WebSocketListener.onPingFrame(WebSocket websocket,
WebSocketFrame frame)
Called when a ping frame (opcode = 0x9) was received.
|
void |
WebSocketAdapter.onPongFrame(WebSocket websocket,
WebSocketFrame frame) |
void |
WebSocketListener.onPongFrame(WebSocket websocket,
WebSocketFrame frame)
Called when a pong frame (opcode = 0xA) was received.
|
void |
WebSocketAdapter.onSendError(WebSocket websocket,
WebSocketException cause,
WebSocketFrame frame) |
void |
WebSocketListener.onSendError(WebSocket websocket,
WebSocketException cause,
WebSocketFrame frame)
Called when an error occurred when a frame was tried to be sent
to the server.
|
void |
WebSocketAdapter.onSendingFrame(WebSocket websocket,
WebSocketFrame frame) |
void |
WebSocketListener.onSendingFrame(WebSocket websocket,
WebSocketFrame frame)
Called before a WebSocket frame is sent.
|
void |
WebSocketAdapter.onTextFrame(WebSocket websocket,
WebSocketFrame frame) |
void |
WebSocketListener.onTextFrame(WebSocket websocket,
WebSocketFrame frame)
Called when a text frame (opcode = 0x1) was received.
|
WebSocket |
WebSocket.sendFrame(WebSocketFrame frame)
Send a WebSocket frame to the server.
|
Modifier and Type | Method and Description |
---|---|
void |
WebSocketAdapter.onMessageError(WebSocket websocket,
WebSocketException cause,
List<WebSocketFrame> frames) |
void |
WebSocketListener.onMessageError(WebSocket websocket,
WebSocketException cause,
List<WebSocketFrame> frames)
Called when it failed to concatenate payloads of multiple frames
to construct a message.
|
Copyright © 2021. All rights reserved.