cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Example multi-single.c does not work on Windows?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 11 Mar 2011 21:56:10 +0100 (CET)

On Fri, 11 Mar 2011, Jason Liu wrote:

> The multi-single.c example on
> http://curl.haxx.se/libcurl/c/multi-single.html always causes select() to
> fail with WSAGetLastError() returning error 10022 (Winsock invalid argument)
>
> I am using Visual Studio 2005, Windows XP SP3, libcurl version 7.19.3.

Please don't use 7.19.3, upgrade!

> Does anyone have any idea why, or how to make it work?

I guess this happens because max_fd contains -1 in that moment and that's just
plain wrong to call select() at that point. The example should be fixed to not
do that...

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-03-11