Hello Santos. Yes, you can use your own main loop. Please see:
"*The fourth threading model (used when no specific flag is given), uses no threads. Instead, the main application must (periodically) request file descriptor sets from MHD, perform a select call and then call MHD_run. MHD_run will then process HTTP requests as usual and return. MHD_run is guaranteed to not block; however, access handlers and response processing callbacks that it invokes may block. This mode is useful if a single-threaded implementation is desired and in particular if the main application already uses a select loop for its processing.*" More ... <https://www.gnu.org/software/libmicrohttpd/> Enjoy MHD! ☺ On Thu, Aug 23, 2018 at 3:36 PM Santos Das <santos....@gmail.com> wrote: > Hi, > > Thank you for the quick reply. I have one more question, please help in > clarifying - > > Can "libmicrohttpd" run as a part of the application event loop or is it > *mandatory > *for the "libmicrohttpd" to have its own event loop? > > thanks, santos > > On Thu, Aug 23, 2018 at 11:58 PM, Christian Grothoff <groth...@gnunet.org> > wrote: > >> On 08/23/2018 06:21 PM, Santos Das wrote: >> > Hi, >> > >> > Can anyone please confirm if libmicrohttpd supports the Async handling? >> >> Yes, it supports asynchronous processing. >> >> > Also, any information on the performance of libmicrohttps will be >> useful. >> >> Let's just say if used properly, it will never be anywhere near the >> bottleneck. We know people running 100,000 requests/s on a single system >> with MHD years ago. Quite likely to do more today, but very difficult to >> test: when benchmarking, you will always be benchmarking your clients, >> your network or your application logic long before hitting any MHD >> threshold (on sane operating systems). >> >> > -- Silvio Clécio