cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Using libcurl with a named pipe instead of a socket on Windows

From: Brett Simmers <swtaarrs_at_gmail.com>
Date: Fri, 13 May 2011 22:31:39 -0700

On Fri, May 13, 2011 at 2:26 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
>> Using libcurl 7.21.6 (on Windows 7 x64), I can use the OPENSOCKETFUNCTION
>> and SOCKOPTFUNCTION callbacks to manually open a file handle on the named
>> pipe and prevent libcurl from attempting to connect it (by returning
>> CURL_SOCKOPT_ALREADY_CONNECTED from the sockopt callback).
>
> I like it that you found use of this feature, as it was just added! =)
>
Yeah, I guess I happened to start looking at just the right time :).

> I wonder if we should introduce another return code for this purpose:
> CURL_SOCKOPT_SOCKET_IS_FILE or so. Then we internally would not do
> socket-specific action on that file descriptor.
>
> It'd take some code edits and some testing to get working. The biggest
> problem might be that select() or poll() won't work with file descriptors on
> Windows (but will on *nix).
>
Thanks for the quick response! It sounds like it's not really feasible
without a bunch of work so we'll probably try to go with some other
solution if we can come up with one. I'll keep an eye on libcurl
releases though, maybe I'll get lucky and it'll show up in 7.21.7 ;).

-Brett
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-05-14