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: curl websockets

From: Henrik Holst via curl-library <curl-library_at_cool.haxx.se>
Date: Wed, 23 Jun 2021 17:38:58 +0200

Would it not be better to use the normal URI used for Websockets which are
"ws(s)://" instead of the http(s) or am I missing something?

/HH

Den ons 23 juni 2021 kl 17:28 skrev Daniel Stenberg via curl-library <
curl-library_at_cool.haxx.se>:

> On Tue, 22 Jun 2021, Weston Schmidt via curl-library wrote:
>
> > I'm interested in feedback or suggestions for what/how to define a good
> > websocket API that complements libcurl.
>
> My very simple idea on how it could be added to the API:
>
> 1. We add another value to set CURLOPT_CONNECT_ONLY to (2). If this is
> used,
> and the URL is "http(s)://" then libcurl could "bootstrap" into a
> websocket
> connection.
>
> 2. Once it is completed, we could have the application extract the socket
> (to
> have something to wait on) and then use curl_easy_recv() and
> curl_easy_send()
> to receive and send websockets data over that connection.
>
> What would this be missing?
>
> --
>
> / daniel.haxx.se
> | Commercial curl support up to 24x7 is available!
> | Private help, bug fixes, support, ports, new features
> | https://www.wolfssl.com/contact/
> -------------------------------------------------------------------
> Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
> Etiquette: https://curl.se/mail/etiquette.html


-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html
Received on 2021-06-23