You can also use very portable and universal solution:
mhd = MHD_start_daemon(MHD_USE_AUTO, ....
while(1)
{
fd_set rs;
fd_set ws;
Thanks for sharing!
Is there any version of this code using epoll()? If so, I could contribute a new example implementing a portable static function, something like "MHD_poll()" in some new example like examples/httpserver_polling.c:
static void
MHD_poll(daemon)
{
/* portable implementation using select() on Windows and epoll() on Unix systems. */
}
...
int
main(void)
{
...
while (true)
MHD_poll(d);