Zth (libzth)
Loading...
Searching...
No Matches
zth::ZmqPoller Class Reference

A PollerServer that uses zmq_poll(). More...

#include <poller.h>

Inheritance diagram for zth::ZmqPoller:
zth::PollerServer< zmq_pollitem_t > zth::PollerServerBase zth::PollerInterface zth::UniqueID< PollerInterface > zth::NamedUniqueID< Named > zth::UniqueIDBase

Public Types

typedef PollerServer< zmq_pollitem_t > base
 
- Public Types inherited from zth::PollerServer< zmq_pollitem_t >
typedef PollerServerBase base
 
typedef PollerClientBase Client
 
- Public Types inherited from zth::PollerServerBase
typedef PollerClientBase Client
 
- Public Types inherited from zth::UniqueID< PollerInterface >
typedef NamedUniqueID base
 

Public Member Functions

 ZmqPoller ()
 
virtual ~ZmqPoller () noexcept override
 
- Public Member Functions inherited from zth::PollerServer< zmq_pollitem_t >
 PollerServer ()=default
 Ctor.
 
 PollerServer (PollerServer const &)=delete
 
 PollerServer (PollerServer &&p)=delete
 
void operator= (PollerServer const &)=delete
 
void operator= (PollerServer &&p)=delete
 
virtual ~PollerServer () noexcept override
 
virtual int migrateTo (PollerServerBase &p) noexcept override
 Move all registered Pollables to another server.
 
virtual void reserve (size_t more) override
 Reserve memory to add more pollables.
 
int add (Pollable &p, Client *client) noexcept final
 Add a Pollable, that belongs to a given client.
 
int add (Pollable &p) noexcept final
 Add a pollable object.
 
int remove (Pollable &p, Client *client) noexcept final
 Remove the given Pollable, belonging to the given client.
 
void remove (size_t last) noexcept
 Remove the last added Pollables.
 
int remove (Pollable &p) noexcept final
 Remove a pollable object.
 
void clear () noexcept
 Clear all Pollables.
 
bool empty () const noexcept final
 Checks if there is any pollable registered.
 
virtual int poll (int timeout_ms) noexcept override
 Poll.
 
- Public Member Functions inherited from zth::PollerServerBase
virtual ~PollerServerBase () noexcept override=default
 
virtual int add (Pollable &p) noexcept=0
 Add a pollable object.
 
int add (std::initializer_list< std::reference_wrapper< Pollable > > l) noexcept
 Add pollable objects.
 
virtual int remove (Pollable &p) noexcept=0
 Remove a pollable object.
 
- Public Member Functions inherited from zth::PollerInterface
virtual ~PollerInterface () noexcept override=default
 Dtor.
 
int add (std::initializer_list< std::reference_wrapper< Pollable > > l) noexcept
 Add pollable objects.
 
- Public Member Functions inherited from zth::UniqueID< PollerInterface >
 UniqueID (UniqueID const &)=delete
 
 UniqueID (UniqueID &&u) noexcept
 
 UniqueID (string const &name)
 
 UniqueID (string &&name)
 
 UniqueID (char const *name=nullptr)
 
UniqueIDoperator= (UniqueID const &)=delete
 
UniqueIDoperator= (UniqueID &&u) noexcept
 
virtual ~UniqueID () noexcept override=default
 
void const * normptr () const noexcept
 
uint64_t id () const noexcept
 
- Public Member Functions inherited from zth::NamedUniqueID< Named >
virtual ~NamedUniqueID () noexcept override=default
 
string const & name () const noexcept
 
void setName (string const &name)
 
void setName (char const *name)
 
void setName (string &&name)
 
virtual char const * id_str () const noexcept override
 

Additional Inherited Members

- Static Public Member Functions inherited from zth::UniqueID< PollerInterface >
static uint64_t getID () noexcept
 
- Protected Types inherited from zth::PollerServer< zmq_pollitem_t >
typedef zmq_pollitem_t PollItem
 
typedef small_vector< PollItem, 4 > PollItemList
 Type of list of poll things.
 
- Protected Member Functions inherited from zth::PollerServer< zmq_pollitem_t >
void event (Pollable::Events revents, size_t index) noexcept
 Register an revents for the PollItem at the given index.
 
- Protected Member Functions inherited from zth::UniqueID< PollerInterface >
virtual uint64_t id_ () const noexcept final
 
- Protected Member Functions inherited from zth::NamedUniqueID< Named >
 NamedUniqueID (char const *name=nullptr)
 
 NamedUniqueID (string const &name)
 
 NamedUniqueID (string &&name)
 
- Protected Member Functions inherited from zth::UniqueIDBase
virtual ~UniqueIDBase () noexcept=default
 

Detailed Description

A PollerServer that uses zmq_poll().

Definition at line 654 of file poller.h.

Member Typedef Documentation

◆ base

typedef PollerServer<zmq_pollitem_t> zth::ZmqPoller::base

Definition at line 657 of file poller.h.

Constructor & Destructor Documentation

◆ ZmqPoller()

zth::ZmqPoller::ZmqPoller ( )

Definition at line 57 of file poller.cpp.

◆ ~ZmqPoller()

zth::ZmqPoller::~ZmqPoller ( )
overridevirtualdefaultnoexcept

The documentation for this class was generated from the following files: