[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] Expose the fdset events
From: |
Simon Newton |
Subject: |
[libmicrohttpd] Expose the fdset events |
Date: |
Sun, 25 Nov 2012 08:07:31 -0800 |
I use microhttpd with the Open Lighting Architecture. As I've posted
before we have a C++ wrapper around libmicrohttpd (HTTPServer), which
then integrates with OLA's event management system.
While this works, it's rather messy. The wrapper sets up a call to a
HTTPServer::UpdateSockets() method into the event loop, and
UpdateSockets() calls MHD_get_fdset to find out what FDs microhttpd is
interested in.
It then loops over all the FDSETs and tries to reconcile the event
manager's state with the desired state from microhttpd. This involves
adding and removing Socket objects from the event manager.
I'd prefer it if I could set a callback to be run each time a FD
should be added or removed from the event manager. Is that easy enough
to do?
Simon
- [libmicrohttpd] Expose the fdset events,
Simon Newton <=