Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Receive WebSocket data.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
CURL | 13.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
curl | The CURL session handle. | $curl | |
BufferSize | The buffer size to use. Default is 65536 and minimum is 1024. |
Optional |
Returns JSON or error.
Offset | The offset of this data into the frame. |
BytesLeft | Number of pending bytes left of the payload. |
BytesReceived | The number of bytes received. |
Flags | Flags for this packet. |
FlagText | True, if this is text. |
FlagBinary | True, if this is binary. |
FlagContinue | True, if this is not the final fragment of the message, which implies that there will be another fragment coming as part of the same message where this bit is not set. |
FlagClose | True, if this closes the transfer. |
FlagPing | True, if this is a ping. |
FlagPong | True, if this is a pong. |
FlagOffset | True, if this is a partial fragment. |
Data | The data received, hex encoded. |
Text | The data read as UTF-8 text, if possible. |
Read websocket:
Set Variable [ $result ; Value: MBS("CURL.WebSocketReceive"; $curl) ]
Example result:
{
"Offset": 11,
"BytesLeft": 0,
"BytesReceived": 11,
"Flags": 2,
"FlagText": false,
"FlagBinary": true,
"FlagContinue": false,
"FlagClose": false,
"FlagPing": false,
"FlagPong": false,
"FlagOffset": false,
"Data": "48656C6C6F20576F726C64",
"Text": "Hello World"
}
This function checks for a license.
Created 11st December 2022, last changed 11st December 2022