sdbus-c++ 2.1.0
High-level C++ D-Bus library based on systemd D-Bus implementation
|
#include <IConnection.h>
Public Member Functions | |
std::chrono::microseconds | getRelativeTimeout () const |
int | getPollTimeout () const |
Public Attributes | |
int | fd |
short int | events |
std::chrono::microseconds | timeout |
int | eventFd |
Carries poll data needed for integration with external event loop implementations.
See getEventLoopPollData() for more info.
int sdbus::IConnection::PollData::getPollTimeout | ( | ) | const |
Returns relative timeout in the form which can be passed as argument 'timeout' to poll(2)
std::chrono::microseconds sdbus::IConnection::PollData::getRelativeTimeout | ( | ) | const |
Returns the timeout as relative value from now.
Returned value is std::chrono::microseconds::max() if the timeout is indefinite.
int sdbus::IConnection::PollData::eventFd |
An additional event fd to be monitored by the event loop for POLLIN events.
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.
std::chrono::microseconds sdbus::IConnection::PollData::timeout |
Absolute timeout value in microseconds, based of CLOCK_MONOTONIC.
Call getPollTimeout() to get timeout recalculated to relative timeout that can be passed to poll(2).