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: WebSocket custom port name as in JavaScript websockets

From: Dan Fandrich via curl-library <curl-library_at_lists.haxx.se>
Date: Thu, 25 May 2023 10:22:29 -0700

On Thu, May 25, 2023 at 05:23:58PM +0200, Johny Bravo via curl-library wrote:
> I have tried websocket API, but I cannot get it working and receive message.
> If I use the ws in JavaScript, I have:
>
> var socket = new WebSocket( "wss://some_url", "example");
>
> However, I dont know, how to set "example" port in libCURL API. I have tried

It sounds like you're trying to use libcurl to talk to a browser. My
understanding is that this will never work, because WebSockets is for
peer-to-server communication and not peer-to-peer and libcurl provides only
a client WebSockets implementation, like a browser does.

Dan
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-05-25