[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libmicrohttpd] Expose the fdset events
From: |
Simon Newton |
Subject: |
Re: [libmicrohttpd] Expose the fdset events |
Date: |
Thu, 4 Jun 2015 08:05:40 -0700 |
On Wed, Jun 3, 2015 at 1:08 AM, Christian Grothoff <address@hidden> wrote:
> Well, the easiest way you can do it now is just ask MHD to run in
> 'EPOLL' mode and grab the epoll() FD. Then you can select/poll/epoll on
> the MHD epoll() FD. You won't get detailed information about add/remove
> events from MHD, but you'll then only have to deal with one FD for all
> of MHD in your event set ever, and your overall big-O complexity for all
> operations should also be perfect.
That only works for platforms with epoll() support.
I'll have a go at building a generic event management API today.
Simon
> My 2 cents
>
> Christian
>
> On 06/03/2015 04:33 AM, Simon Newton wrote:
>> Digging up a thread from the past...
>>
>> Is the codebase in a better shape to make this change now? We've run
>> into this again now that we've switched to using kevent rather than
>> select.
>>
>>
>> If you're looking for existing APIs to model this from, Avahi has a
>> watch API [1] which provides fd notifications, and that has worked
>> well for us.
>>
>> [1] http://avahi.org/download/doxygen/struct_avahi_poll.html
>>
>>
>> Simon
>>