RTBKit  0.9
Open-source framework to create real-time ad bidding systems.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Classes | Public Types | Public Member Functions | Public Attributes
Datacratic::ZmqNamedClientBus Struct Reference

#include <zmq_endpoint.h>

Inheritance diagram for Datacratic::ZmqNamedClientBus:
Datacratic::ZmqNamedEndpoint Datacratic::NamedEndpoint Datacratic::MessageLoop Datacratic::Epoller Datacratic::AsyncEventSource

List of all members.

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

Detailed Description

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.


Member Function Documentation

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.


Member Data Documentation

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.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator