curl/include/curl
Daniel Stenberg e3f335148a
websockets: remodeled API to support 63 bit frame sizes
curl_ws_recv() now receives data to fill up the provided buffer, but can
return a partial fragment. The function now also get a pointer to a
curl_ws_frame struct with metadata that also mentions the offset and
total size of the fragment (of which you might be receiving a smaller
piece). This way, large incoming fragments will be "streamed" to the
application. When the curl_ws_frame struct field 'bytesleft' is 0, the
final fragment piece has been delivered.

curl_ws_recv() was also adjusted to work with a buffer size smaller than
the fragment size. (Possibly needless to say as the fragment size can
now be 63 bit large).

curl_ws_send() now supports sending a piece of a fragment, in a
streaming manner, in addition to sending the entire fragment in a single
call if it is small enough. To send a huge fragment, curl_ws_send() can
be used to send it in many small calls by first telling libcurl about
the total expected fragment size, and then send the payload in N number
of separate invokes and libcurl will stream those over the wire.

The struct curl_ws_meta() returns is now called 'curl_ws_frame' and it
has been extended with two new fields: *offset* and *bytesleft*. To help
describe the passed on data chunk when a fragment is delivered in many
smaller pieces.

The documentation has been updated accordingly.

Closes #9636
2022-10-07 12:50:58 +02:00
..
.gitignore copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
curl.h curl.h: fix mention of wrong error code in comment 2022-09-22 09:43:39 +02:00
curlver.h RELEASE-NOTES: synced 2022-09-07 14:18:28 +02:00
easy.h copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
header.h header: define public API functions as extern c 2022-09-08 11:54:32 -04:00
Makefile.am ws: initial websockets support 2022-09-09 15:11:14 +02:00
mprintf.h copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
multi.h misc: spelling fixes 2022-08-31 14:31:01 +00:00
options.h misc: null-terminate 2022-09-17 23:19:29 +02:00
stdcheaders.h copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
system.h copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
typecheck-gcc.h setopt: add CURLOPT_PROTOCOLS_STR and CURLOPT_REDIR_PROTOCOLS_STR 2022-07-04 08:35:09 +02:00
urlapi.h copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
websockets.h websockets: remodeled API to support 63 bit frame sizes 2022-10-07 12:50:58 +02:00