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: Daniel Stenberg <>
Date: Mon, 16 Mar 2015 11:56:56 +0100 (CET)

On Mon, 16 Mar 2015, YAMADA Yasuharu wrote:

> It works fine until 7.28.0. But it dose not work since 7.29.0. easy_send()
> returns CURL_SOCKET_BAD from Curl_getconnectinfo(). I guess because cURL
> changes the concept how to use easy and multi.

We change internals all the time and sometimes that ends up with some
unintended side-effects. Most often due to lack of good test cases and
features that aren't used often enough for us to detect immediately when they

> I hope it works fine for 7.40.0 or later.

Why don't you try and then tell us?

> 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.

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

> - 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...

List admin:
Received on 2015-03-16