6 #ifndef ZEROEQ_RECEIVER_H
7 #define ZEROEQ_RECEIVER_H
10 #include <zeroeq/types.h>
19 namespace detail {
class Receiver; }
20 namespace connection {
namespace detail{
class Broker; }}
47 ZEROEQ_API
explicit Receiver( Receiver& shared );
65 friend class detail::Receiver;
68 virtual void addSockets( std::vector< detail::Socket >& entries ) = 0;
76 virtual void process( detail::Socket& socket, uint32_t timeout ) = 0;
92 friend class connection::detail::Broker;
94 void* getZMQContext();
97 Receiver& operator=(
const Receiver& ) =
delete;
99 std::shared_ptr< detail::Receiver >
const _impl;
Receiver()
Create a new standalone receiver.
bool receive(const uint32_t timeout=TIMEOUT_INDEFINITE)
Receive at least one event from all shared receivers.
Defines export visibility macros for library ZeroEQ.
static const uint32_t TIMEOUT_INDEFINITE
Constant defining 'wait forever' in methods with wait parameters.
virtual void addConnection(const std::string &uri)=0
Add the given connection to the list of receiving sockets.
virtual void addSockets(std::vector< detail::Socket > &entries)=0
Add this receiver's sockets to the given list.
virtual void process(detail::Socket &socket, uint32_t timeout)=0
Process data on a signalled socket.
virtual ~Receiver()
Destroy this receiver.
Base class for entities receiving data.
Publish-subscribe classes for typed events.
virtual void update()
Update the internal connection list.