|
From: | Christian Grothoff |
Subject: | Re: [libmicrohttpd] Remove PlibC from autotools files |
Date: | Sat, 10 Aug 2013 11:50:39 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130704 Icedove/17.0.7 |
On 08/10/13 00:24, LRN wrote:
Isn't it simple to use local socket instead of pipe? This will work on all platforms. I don't think than requiring Vista+ is good solution for MHD.That is also a good idea - using threads to simultaneously select on sockets and a pipe will require a socket for wakeup anyway, so just using a socket instead of a pipe in the first place, and forgoing the pipe entirely, seems the logical choice.
I had actually been thinking of using that kind of construction for handling "HTTP UPGRADE" and SSL, essentially returning a local socket (on W32) for the (encrypted) communication with the client. Here, a pipe would not do as the communication after UPGRADE would be bidirectional.
So there's another reason to add code to create a local socket to MHD, which means I like this suggestion even better. If in the end all we have to do is
#if WINDOWS localsocket (bla); else pipe (bla); #endif or in another location (for UPGRADE) #if WINDOWS localsocket (bla); else socketpair (args, bla); #endifand in return for those "minor" #ifdefs we get to eliminate plibc and the select-mess, I think I'll be quite happy.
My 2 cents Christian
[Prev in Thread] | Current Thread | [Next in Thread] |