![]() |
RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
#include <zmq_endpoint.h>
Public Types | |
| typedef std::function< void(Arg)> | MessageHandler |
Public Member Functions | |
| ZmqBinaryTypedEventSource (zmq::socket_t &socket, MessageHandler messageHandler=MessageHandler()) | |
| void | init (zmq::socket_t &socket) |
| virtual int | selectFd () const |
| virtual bool | poll () const |
| virtual bool | processOne () |
| virtual void | handleMessage (const Arg &arg) |
| zmq::socket_t & | socket () const |
Public Attributes | |
| MessageHandler | messageHandler |
| zmq::socket_t * | socket_ |
An adaptor that is used to deal with a zeromq connection that sends length one messages of a binary data structure.
Definition at line 216 of file zmq_endpoint.h.
| virtual bool Datacratic::ZmqBinaryTypedEventSource< Arg >::poll | ( | ) | const [inline, virtual] |
Returns true if there is work to be done. May be called from more than one thread. Should never block.
Reimplemented from Datacratic::AsyncEventSource.
Definition at line 251 of file zmq_endpoint.h.
| virtual bool Datacratic::ZmqBinaryTypedEventSource< Arg >::processOne | ( | ) | [inline, virtual] |
Process a single message and return true if there are more to be processed.
This may be called from more than one thread if singleThreaded() is false.
Implements Datacratic::AsyncEventSource.
Definition at line 268 of file zmq_endpoint.h.
| virtual int Datacratic::ZmqBinaryTypedEventSource< Arg >::selectFd | ( | ) | const [inline, virtual] |
Return the file descriptor on which one should select() for messages from this source. The source should organize itself such that if the fd indicates ready for a read, there is something to do.
Should return -1 if it requires polling.
Should never block.
Reimplemented from Datacratic::AsyncEventSource.
Definition at line 241 of file zmq_endpoint.h.
1.7.6.1