History log of /curl/lib/ws.c (Results 51 – 59 of 59)
Revision Date Author Comments
# e3f33514 03-Oct-2022 Daniel Stenberg

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 po

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

show more ...


# a2fa5f86 20-Sep-2022 Daniel Stenberg

ws: fix a C89 compliance nit

Closes #9541


# a46e4124 17-Sep-2022 John Bampton

misc: fix spelling in two source files

Closes #9529


# ec51f004 16-Sep-2022 Daniel Stenberg

ws: the infof() flags should be %zu

Follow-up to e5e9e0c5e49ae0

Closes #9518


# 7740530c 12-Sep-2022 Marcel Raad

ws: fix build without `USE_WEBSOCKETS`

The curl.h include is required unconditionally.


# a0ff4dba 12-Sep-2022 Marcel Raad

ws: add missing curl.h include

A conflict between commits 664249d0952 and e5839f4ee70 broke the build.


# e5e9e0c5 12-Sep-2022 Daniel Stenberg

ws: fix an infof() call to use %uz for size_t output

Detected by Coverity, CID 1514665.

Closes #9480


# eebfa327 09-Sep-2022 Daniel Stenberg

curl_ws_meta: initial implementation


# 664249d0 09-Sep-2022 Daniel Stenberg

ws: initial websockets support

Closes #8995


123