On Fri, Jun 17, 2022 at 01:39:00PM +0200, Daniel Stenberg via curl-library wrote: > I would like to provide websockets data with the CURLOPT_WRITEFUNCTION > callback as well. But how would libcurl provide the additional necessary > metadata?
I'm admittedly not very familiar with websockets, but would it make sense to move the abstraction up a layer? In other words, giving each web socket its own easy handle with its own set of websocket parameters. The different easy handles would be tied to a single web socket transport via a multi handle with curl handling the multiplexing of websocket data onto a single transport. That way no extra data would need to be sent in each write callback; any such data would instead be tied to the easy handle. I don't know how often things like opcode would need to be changed, but they could be set on the appropriate handle using curl_easy_setopt whenever necessary. Dan -- Unsubscribe: https://lists.haxx.se/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.html