curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Sending a fragmented WebSocket message.

From: Paul Fotheringham via curl-library <curl-library_at_lists.haxx.se>
Date: Tue, 19 Sep 2023 11:53:05 +0100

On Mon, 18 Sept 2023 at 23:56, Paul Fotheringham
<fotheringham.paul_at_gmail.com> wrote:
>
> I propose
> - changing the CURLWS_TEXT thru CURLWS_PING defines to be their actual
> numerical 4-bit values
> - rename the curl_ws_send's flags argument to opcode
> - add an argument to curl_ws_send to replace the CURLWS_OFFSET functionality
> - add libtest cases to cover csl_ws_send for non-control frames
> -- libtest 2303 claims to test curl_ws_send but the code is missing to
> actually send a (unfragmneted) text frame
> -- add a libtest for sending a fragmented text frame, not sure how to
> verify the data server-size though
> - add a libtest for sending a frame in pieces i.e. the CURLWS_OFFSET
> functionality

Missing from the above list:
- add argument to curl_ws_send to hold the FIN/RSV* flags, this would
be a repurposed flags argument

There is also a modification to the above list:

Replacing the CURLWS_OFFSET functionality does not necessarily require
a new argument. If curl_off_t is guaranteed to be signed then we could
have a negative value represent that the send is whole rather than
partial and then zero is only used for the subsequent calls for
partial frames. Alternatively we could have a curl_ws_send_partial.
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-09-19