CURLOPT_WS_OPTIONS.md add history, drop cast

This commit is contained in:
Viktor Szakats 2025-08-01 17:33:38 +02:00
parent 6088b7bf3b
commit cc42e32840
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201

View file

@ -66,13 +66,19 @@ int main(void)
CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, "ws://example.com/");
/* tell curl we deal with all the WebSocket magic ourselves */
curl_easy_setopt(curl, CURLOPT_WS_OPTIONS, (long)CURLWS_RAW_MODE);
curl_easy_setopt(curl, CURLOPT_WS_OPTIONS, CURLWS_RAW_MODE);
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
~~~
# HISTORY
**CURLWS_RAW_MODE** and **CURLWS_NOAUTOPONG** macros became `long` types
in 8.16.0, prior to this version a `long` cast was necessary when passed
to curl_easy_setopt(3).
# %AVAILABILITY%
# RETURN VALUE