|
DUDS
|
Distributed Update of Data from Something
|
Responds to a poll event. More...
#include <Poller.hpp>
Public Member Functions | |
| virtual void | respond (Poller *poller, int fd)=0 |
| Called by Poller::wait(std::chrono::milliseconds) when an event occurs on the given file descriptor. More... | |
Responds to a poll event.
The associated file descriptor(s) should not be closed until after the response entry is removed from the poller (see Poller::remove()). A class stored in a std::weak_ptr is used instead of std::function because it will ensure the object exists prior to being invoked.
Definition at line 78 of file Poller.hpp.
|
pure virtual |
Called by Poller::wait(std::chrono::milliseconds) when an event occurs on the given file descriptor.
The PollResponder object may be associated with multiple file descriptors across one or more Poller objects.
This function may add or remove PollResponder objects to or from the invoking poller. If poller already has a queued event for a given file descriptor, removing the responder for that descriptor here will not prevent the responder from being invoked for the queued event.
| poller | The Poller object invoking this function. |
| fd | The file descriptor with an event. |
Implemented in duds::os::linux::EvdevInput.