![]() |
RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
#include <zmq_endpoint.h>
Classes | |
struct | ClientInfo |
Public Types | |
typedef std::function< void(std::vector < std::string >)> | ClientMessageHandler |
Public Member Functions | |
ZmqNamedClientBus (std::shared_ptr< zmq::context_t > context, double deadClientDelay=5.0) | |
void | init (std::shared_ptr< ConfigurationService > config, const std::string &endpointName) |
void | shutdown () |
template<typename... Args> | |
void | sendMessage (const std::string &address, const std::string &topic, Args &&...args) |
virtual void | handleMessage (std::vector< std::string > &&message) |
virtual void | handleClientMessage (const std::vector< std::string > &message) |
Public Attributes | |
double | deadClientDelay |
std::function< void(std::string)> | onConnection |
std::function< void(std::string)> | onDisconnection |
ClientMessageHandler | clientMessageHandler |
A named service endpoint that keeps track of the clients that are connected and will notify on connection and disconnection.
Definition at line 683 of file zmq_endpoint.h.
void Datacratic::ZmqNamedClientBus::init | ( | std::shared_ptr< ConfigurationService > | config, |
const std::string & | endpointName | ||
) | [inline] |
The endpoint exists. Publish that to anyone who may care.
Reimplemented from Datacratic::NamedEndpoint.
Definition at line 691 of file zmq_endpoint.h.
How long until we decide a client that's not sending a heartbeat is dead.
Definition at line 713 of file zmq_endpoint.h.
std::function<void (std::string)> Datacratic::ZmqNamedClientBus::onConnection |
Function called when something connects to the bus
Definition at line 716 of file zmq_endpoint.h.
std::function<void (std::string)> Datacratic::ZmqNamedClientBus::onDisconnection |
Function called when something disconnects from the bus (we can tell due to timeouts).
Definition at line 721 of file zmq_endpoint.h.