Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::messaging::StreamDispatcher< OutputStream > Class Template Reference

#include <stream_parser.hpp>

Public Member Functions

 StreamDispatcher (OutputStream &out)
 
bool onNewData (msgpack::object &obj)
 
void registerTarget (uint32_t msgType, std::function< bool(msgpack::object &)> &handler)
 

Private Member Functions

void sendPong (uint32_t pingId)
 
bool handleSystemMessage (msgpack::object &obj)
 

Private Attributes

OutputStream & outputStream
 
std::unordered_map< uint32_t, std::function< bool(msgpack::object &)> > messageHandlers
 

Detailed Description

template<typename OutputStream>
class bb::messaging::StreamDispatcher< OutputStream >

Definition at line 13 of file stream_parser.hpp.

Constructor & Destructor Documentation

◆ StreamDispatcher()

template<typename OutputStream >
bb::messaging::StreamDispatcher< OutputStream >::StreamDispatcher ( OutputStream &  out)
inline

Definition at line 21 of file stream_parser.hpp.

Member Function Documentation

◆ handleSystemMessage()

template<typename OutputStream >
bool bb::messaging::StreamDispatcher< OutputStream >::handleSystemMessage ( msgpack::object &  obj)
private

Definition at line 50 of file stream_parser.hpp.

◆ onNewData()

template<typename OutputStream >
bool bb::messaging::StreamDispatcher< OutputStream >::onNewData ( msgpack::object &  obj)

Definition at line 28 of file stream_parser.hpp.

◆ registerTarget()

template<typename OutputStream >
void bb::messaging::StreamDispatcher< OutputStream >::registerTarget ( uint32_t  msgType,
std::function< bool(msgpack::object &)> &  handler 
)

Definition at line 45 of file stream_parser.hpp.

◆ sendPong()

template<typename OutputStream >
void bb::messaging::StreamDispatcher< OutputStream >::sendPong ( uint32_t  pingId)
private

Definition at line 63 of file stream_parser.hpp.

Member Data Documentation

◆ messageHandlers

template<typename OutputStream >
std::unordered_map<uint32_t, std::function<bool(msgpack::object&)> > bb::messaging::StreamDispatcher< OutputStream >::messageHandlers
private

Definition at line 16 of file stream_parser.hpp.

◆ outputStream

template<typename OutputStream >
OutputStream& bb::messaging::StreamDispatcher< OutputStream >::outputStream
private

Definition at line 15 of file stream_parser.hpp.


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