On Mon, 20 Jun 2022, Dmitry Karpov via curl-library wrote:
Yes, it would be nice to have just one callback for all WS modes (RAW,
FRAME, MESSAGE) but using CURLOPT_WRITEFUNCTION callback for that purpose
doesn't seem like an optimal solution to me because of the problems related
to passing curl handle to it and making a function call to get WS context
metadata.
Right, we have to pick one of the two ways where neither is optimal.
I still think I'm going to try with a single CURLOPT_WRITEFUNCTION callback to
start with and a "curl_ws_meta()" function that can be used from within that
callback to get additional data about the frame - when used in frame mode.
I think getting something working that we can try with is a good thing and
then if this turns out feeling too awkward and special, we can switch it
around and do a separate callback option instead.
--
/ daniel.haxx.se
| Commercial curl support up to 24x7 is available!
| Private help, bug fixes, support, ports, new features
| https://curl.se/support.html
--
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html