Most applications that I have made with libevent involve one read callback and whenever a new connection is opened for a request I allocate a new event with ::event_new()
and then add that event to the event base via ::event_add()
But the problem with this is that every time a new request is opened I allocate memory and add that to the event loop, when in reality I should be sharing callbacks and events for file descriptors. Granted memory allocation is not a bottleneck for such an application, does libevent offer some way to share events with multiple file descriptors?