sdbus-c++ 1.5.0
High-level C++ D-Bus library based on systemd D-Bus implementation
|
#include <IConnection.h>
Public Member Functions | |
std::chrono::microseconds | getAbsoluteTimeout () const |
std::optional< std::chrono::microseconds > | getRelativeTimeout () const |
int | getPollTimeout () const |
Public Attributes | |
int | fd |
short int | events |
uint64_t | timeout_usec |
Poll Data for external event loop implementations.
To integrate sdbus with your app's own custom event handling system you can use this method to query which file descriptors, poll events and timeouts you should add to your app's poll(2), or select(2) call in your main event loop.
If you are unsure what this all means then use enterEventLoop() or enterEventLoopAsync() instead.
|
inline |
Get the event poll timeout.
The timeout is an absolute value based of CLOCK_MONOTONIC.
int sdbus::IConnection::PollData::getPollTimeout | ( | ) | const |
Get a converted, relative timeout which can be passed as argument 'timeout' to poll(2)
std::optional< std::chrono::microseconds > sdbus::IConnection::PollData::getRelativeTimeout | ( | ) | const |
Get the timeout as relative value from now
short int sdbus::IConnection::PollData::events |
The events to use for poll(2) alongside fd.
int sdbus::IConnection::PollData::fd |
The read fd to be monitored by the event loop.
uint64_t sdbus::IConnection::PollData::timeout_usec |
Absolute timeout value in micro seconds and based of CLOCK_MONOTONIC.