Classes
Methods
(static) WebSocketFrame.binaryFrame(data, isFinal) → {WebSocketFrame}
Create a binary WebSocket frame.
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Buffer | the data for the frame |
isFinal |
boolean | true if it's the final frame in the WebSocket message |
- Source:
Returns:
the frame
- Type
- WebSocketFrame
(static) WebSocketFrame.continuationFrame(data, isFinal) → {WebSocketFrame}
Create a continuation frame
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Buffer | the data for the frame |
isFinal |
boolean | true if it's the final frame in the WebSocket message |
- Source:
Returns:
the frame
- Type
- WebSocketFrame
(static) WebSocketFrame.textFrame(str, isFinal) → {WebSocketFrame}
Create a text WebSocket frame.
Parameters:
| Name | Type | Description |
|---|---|---|
str |
string | the string for the frame |
isFinal |
boolean | true if it's the final frame in the WebSocket message |
- Source:
Returns:
the frame
- Type
- WebSocketFrame