26#ifndef GOBY_MIDDLEWARE_TRANSPORT_POLLER_H
27#define GOBY_MIDDLEWARE_TRANSPORT_POLLER_H
55 int _transporter_poll(std::unique_ptr<std::unique_lock<std::mutex> >& lock)
override
58 int inner_poll_items = 0;
64 if (!inner_poll_items)
65 poll_items +=
static_cast<Transporter*
>(
this)->_poll(lock);
69 return inner_poll_items + poll_items;
Defines the common interface for polling for data on Goby transporters.
PollerInterface(std::shared_ptr< std::mutex > poll_mutex, std::shared_ptr< std::condition_variable > cv)
std::shared_ptr< std::mutex > poll_mutex()
access the mutex used for poll synchronization
std::shared_ptr< std::condition_variable > cv()
access the condition variable used for poll synchronization
Poller(PollerInterface *inner_poller=nullptr)
Construct this Poller with a pointer to the inner Poller (unless this is the innermost Poller).
PollerInterface * inner_poller()
Objects implementing the Goby nested middleware.
The global namespace for the Goby project.