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

#include <zmq_endpoint.h>

Inheritance diagram for Datacratic::ZmqTypedEventSource< T >:
Datacratic::ZmqEventSource Datacratic::AsyncEventSource

List of all members.

Public Types

typedef std::function< void(T
&&, std::string address)> 
OnMessage

Public Member Functions

 ZmqTypedEventSource (zmq::socket_t &socket, bool routable, const std::string &messageTopic)
void init (zmq::socket_t &socket, bool routable, const std::string messageTopic)
virtual void handleMessage (const std::vector< std::string > &message)
virtual void handleTypedMessage (T &&message, const std::string &address)

Public Attributes

OnMessage onMessage
bool routable
std::string messageTopic

Detailed Description

template<typename T>
struct Datacratic::ZmqTypedEventSource< T >

A sink that listens for zeromq messages of the format:

1. address (optional) 2. message kind 3. message type 4. binary payload

and calls a callback on the decoded message.

Definition at line 312 of file zmq_endpoint.h.


Member Function Documentation

template<typename T >
virtual void Datacratic::ZmqTypedEventSource< T >::handleMessage ( const std::vector< std::string > &  message) [inline, virtual]

Handle a message. The default implementation will call syncMessageHandler if it is defined; otherwise it calls handleSyncMessage and writes back the response to the socket.

Reimplemented from Datacratic::ZmqEventSource.

Definition at line 339 of file zmq_endpoint.h.


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