summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2022-11-18 09:39:26 +0100
committerDaniel Stenberg <daniel@haxx.se>2022-11-18 09:58:07 +0100
commit117e3372a857d3a6a7303047b58f5dc72821bf6a (patch)
tree828f157f42a883933edbfc47a0015004614f2930 /docs
parent12e1def51a75392df62e65490416007d7e68dab9 (diff)
downloadcurl-117e3372a857d3a6a7303047b58f5dc72821bf6a.tar.gz
docs/WEBSOCKET.md: explain the URL use
Fixes #9936 Closes #9941
Diffstat (limited to 'docs')
-rw-r--r--docs/WEBSOCKET.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/WEBSOCKET.md b/docs/WEBSOCKET.md
index f44f838ea..a52588d54 100644
--- a/docs/WEBSOCKET.md
+++ b/docs/WEBSOCKET.md
@@ -6,6 +6,21 @@ SPDX-License-Identifier: curl
# WebSocket in curl
+## URL
+
+WebSocket communication with libcurl is done by setting up a transfer to a URL
+using the `ws:/` or `wss://` URL schemes. The latter one being the secure
+version done over HTTPS.
+
+When using `wss://` to do WebSocket over HTTPS, the standard TLS and HTTPS
+options will be acknowledged for the CA, verification of server certificate
+etc.
+
+WebSocket communication is done by upgrading a connection from either HTTP or
+HTTPS. When given a WebSocket URL to work with, libcurl considers it a
+transfer failure if the upgrade procedure fails. This means that a plain HTTP
+200 response code is considered an error for this work.
+
## API
The WebSocket API is described in the individual man pages for the new API.