Repository navigation
WebSocket Reference
Qriist edited this page Sep 17, 2026
·
2 revisions
The WebSocket interface provides framed, protocol-level messaging over an established TCP/TLS connection. The easy_handle must be converted to WebSocket mode before any send or receive operations can occur.
| Method | Description | libcurl Reference |
|---|---|---|
WebSocketConvert(easy_handle?) |
Upgrades the handle to WebSocket mode, performing the handshake and configuring internal framing. | curl_ws_send |
SetWebSocketFrameSize(frame_size := 10 * 1024, easy_handle?) |
Configures the outgoing frame size limit (default 10 KB). | curl_ws_send |
| Method | Description | libcurl Reference |
|---|---|---|
WebSocketSend(content, flagArr := ["TEXT"], easy_handle?) |
Transmits a framed WebSocket message. Accepts String, Integer, Object, Array, Map, and Buffer. | curl_ws_send |
WebSocketReceive(easy_handle?) |
Reads incoming WebSocket frames. Internally handles the CURL_WAITING_READY state. |
curl_ws_recv |
- Easy Handle Reference — single transfer lifecycle
- Raw Send and Receive — unframed protocol-level data exchange
- Debug and Diagnostics — tracing and logging network activity
Foundations
Operations
- Download Modes
- Setting and Listing Options
- Setting and Inspecting Headers
- POST and Upload
- Multiple Easy Handles
- Async and Multi Interface
- URL Construction
- Share Interface
- MIME and Multipart
- Raw Send and Receive
- Pause and Resume
- WebSocket
- SSL Sessions
- Debug and Diagnostics
API Reference
- Easy Handle Reference
- Multi Handle Reference
- Share Handle Reference
- MIME Handle Reference
- URL Handle Reference
- Utility Methods Reference
- WebSocket Reference
Code Snippets