Christian Grothoff <[email protected]> wrote:
> Now I do. I've modified the "minimal_example.c" from src/examples/ to
> make it dual-stack. As you can see, the changes are trivial.
Fo me the non obivous thing for me was the fact, that it is still possible to
have
a single threaded solution with two listening sockets by just calling
MHD_get_fdset on both sockets.
So what I do now is something like this:
struct MHD_Daemon *dv4;
struct MHD_Daemon *dv6;
...
dv6 = MHD_start_daemon(MHD_USE_IPv6,...
dv4 = MHD_start_daemon(MHD_NO,...
...
if (dv4!=NULL)
if (MHD_YES != MHD_get_fdset (dv4, ...))
break; /* fatal internal error */
if (dv6!=NULL)
if (MHD_YES != MHD_get_fdset (dv6, ...))
break
Sven
--
"In the land of the brave and the free, we defend our freedom
with the GNU GPL" (Richard M. Stallman on www.gnu.org)
/me is giggls@ircnet, http://sven.gegg.us/ on the Web