Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

CURL.SetOptionWebSocketOptions

Sets WebSocket behaviour options.

Component Version macOS Windows Linux Server iOS SDK
CURL 13.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "CURL.SetOptionWebSocketOptions"; curl; Options )   More

Parameters

Parameter Description Example
curl The CURL session handle. $curl
Options The new options.

Result

Returns OK or error.

Description

Sets WebSocket behaviour options.
Pass a bit mask to tell CURL about specific WebSocket behaviors.

To detach a WebSocket connection and use the CURL.WebSocketSend and CURL.WebSocketReceive functions after the HTTP upgrade procedure, set the CURL.SetOptionConnectOnly option to 2.

Available bits in the bitmask:

1: Deliver "raw" WebSocket traffic to the Write event.
2: No auto pong.

In raw mode, CURL does not handle pings or any other frame for the application.

See also

Release notes

Blog Entries

This function checks for a license.

Created 11st December 2022, last changed 11st June 2025


CURL.SetOptionVerbose - CURL.SetOptionWildCardMatch