cURL / Mailing Lists / curl-library / Single Mail


Re: how do I create websocket client with libcurl (was: A quick hack to support Websocket with libcurl)

From: YAMADA Yasuharu <>
Date: Tue, 17 Mar 2015 09:54:06 +0900

Hi Danial,

2015-03-16 19:56 GMT+09:00 Daniel Stenberg <>:

> I hope it works fine for 7.40.0 or later.
> Why don't you try and then tell us?

sorry I did not focus this problem long time.
I try to test 7.28.0~7.40.0 these days.

 So I have questions:
>> - that dummy code is correct how to use cURL API?
> It lacks a lot of checks and it uses a busy-loop so I wouldn't call it
> correct, but I believe it should work.

I'd like to confirm.
Is it correct how to use cURL API like that dummy code?

Set a few break-point and figure out what happens?

curl_multi_perform() CONNECT to server
-> easy_connection()
-> Curl_getconnectinfo()
-> data->multi_easy is NULL because it does not use easy_perform()
-> return CURL_SOCKET_BAD by Curl_getconnectinfo()

# I guess
is convenient for this issue.

 - there is another way to create the application?
> Skip libcurl and just connect a socket to the server? You're not using
> libcurl very much anyway...

The application is web browser and we use libcurl for it more than 4 years.
I know it can connect to websocket server through socket.
but for browsing, the connection through proxy, authentication, SSL/TLS,
It is difficult to use socket directory.

Best regards,
YAMADA Yasuharu


List admin:
Received on 2015-03-17