A WebSocket message is composed of one or more WebSocket frames.
If there is a just a single frame in the message then a single text or binary frame should be created with final = true.
If there are more than one frames in the message, then the first frame should be a text or binary frame with final = false, followed by one or more continuation frames. The last continuation frame should have final = true.
| Modifier and Type | Method and Description |
|---|---|
| public Buffer | Returns: the data of the frame
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
|
| public static WebSocketFrame | Returns: the framethe data for the frame data, boolean true if it's the final frame in the WebSocket message isFinal)
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Create a binary WebSocket frame. |
| public String | |
| public short | |
| public static WebSocketFrame | Returns: the framethe data for the frame data, boolean true if it's the final frame in the WebSocket message isFinal)
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Create a continuation frame |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public static WebSocketFrame | |
| public static WebSocketFrame | |
| public String | Returns: the content of this frame as a UTF-8 string and returns the converted string. Only use this for text frames.
|
| public static WebSocketFrame | |
| public WebSocketFrameType |
| binaryData | back to summary |
|---|---|
| public Buffer binaryData()
References Deprecated
See corresponding docs for further information.
| |
| binaryFrame | back to summary |
|---|---|
| public static WebSocketFrame binaryFrame(Buffer data, boolean isFinal)
References Deprecated
See corresponding docs for further information. Create a binary WebSocket frame.
| |
| closeReason | back to summary |
|---|---|
public String closeReason()
| |
| closeStatusCode | back to summary |
|---|---|
public short closeStatusCode()
| |
| continuationFrame | back to summary |
|---|---|
| public static WebSocketFrame continuationFrame(Buffer data, boolean isFinal)
References Deprecated
See corresponding docs for further information. Create a continuation frame
| |
| isBinary | back to summary |
|---|---|
public boolean isBinary()
| |
| isClose | back to summary |
|---|---|
public boolean isClose()
| |
| isContinuation | back to summary |
|---|---|
public boolean isContinuation()
| |
| isFinal | back to summary |
|---|---|
public boolean isFinal()
| |
| isPing | back to summary |
|---|---|
public boolean isPing()
| |
| isText | back to summary |
|---|---|
public boolean isText()
| |
| pingFrame | back to summary |
|---|---|
| public static WebSocketFrame pingFrame(Buffer data)
References Deprecated
See corresponding docs for further information. Create a ping WebSocket frame. Will be a final frame. There is no option for non final ping frames.
| |
| pongFrame | back to summary |
|---|---|
| public static WebSocketFrame pongFrame(Buffer data)
References Deprecated
See corresponding docs for further information. Create a pong WebSocket frame. Will be a final frame. There is no option for non final pong frames.
| |
| textData | back to summary |
|---|---|
public String textData()
| |
| textFrame | back to summary |
|---|---|
| public static WebSocketFrame textFrame(String str, boolean isFinal) Create a text WebSocket frame.
| |
| type | back to summary |
|---|---|
public WebSocketFrameType type()
| |