cURL / Mailing Lists / curl-library / Single Mail

curl-library

SOCKS5 connecting (was Re: libCurl and BOINC)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 21 Aug 2006 00:47:37 +0200 (CEST)

On Thu, 17 Aug 2006, Rom Walton wrote:

> Here is the patch description for the SOCKS patch:

> First is with sock5 proxy, on Windows libcurl connects, but before the
> connection is made libcurl writes to the socket. That produces an error and
> the socket is closed. Libcurl needs to wait until the connection is
> complete before writing to the socket.
>
> Attached is a patch (url_c.patch) that addresses the connect issue, but it
> blocks during the connect while the sock protocol is being handled. Not
> good since we're using the multi interface.

Why is that waiting only necessary for the multi interface use case?

Isn't it better to make the socks-logic better incorporated into the already
existing non-blocking connect logic? That is proven to work on a wide range of
platforms and is in fact somewhat more complicated than your patch here.

The SOCKS state in libcurl is this bad just because nobody has cared enough to
make it good and proper.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-08-21