libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] running in main thread


From: silvioprog
Subject: Re: [libmicrohttpd] running in main thread
Date: Wed, 4 Dec 2019 12:00:15 -0300

On Wed, Dec 4, 2019 at 9:38 AM Evgeny Grin <address@hidden> wrote:
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);

--
Silvio Clécio

reply via email to

[Prev in Thread] Current Thread [Next in Thread]