cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Socks5 works on Linux but not on Windows?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 23 Oct 2005 18:29:50 +0200 (CEST)

On Sun, 23 Oct 2005, Shmulik Regev wrote:

> I'm trying to use a socks5 proxy with my libcurl (version 7.14.1) based
> application. The Linux version works great. Windows however is a different
> story. Normally it fails with error 10057 "Socket is not connected".

At what point does it fail and report this error back, you know?

> BUT if I put a breakpoint in the handleSock5Proxy function before calling
> the first Curl_write (url.c:1812) the code is likely to work! This obviously
> suggests a timing problem.

It certainly sounds so.

> Any ideas? I suspect it is a (windows related ?) async connect problem but
> I'm not sure what the solution is.

Since the code is identical, I would guess that the difference is simply due
to different IP implemenations and that you _could_ get it on other platforms
to if there just is a little different timing involved or similar.

The socks code is not in a perfect state. For example it always assume that it
can send data without blocking, as if it can't it will blatantly fail.

-- 
   Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-10-23