Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::nodejs::AsyncMessageProcessor Class Reference

#include <message_processor.hpp>

Public Member Functions

template<typename T , typename R >
void register_handler (uint32_t msgType, T *self, R(T::*handler)() const, bool unique=false)
 
template<typename T , typename R >
void register_handler (uint32_t msgType, T *self, R(T::*handler)(), bool unique=false)
 
template<typename T , typename P , typename R >
void register_handler (uint32_t msgType, T *self, R(T::*handler)(const P &) const, bool unique=false)
 
template<typename T , typename P , typename R >
void register_handler (uint32_t msgType, T *self, R(T::*handler)(const P &), bool unique=false)
 
template<typename T , typename P , typename R >
void register_handler (uint32_t msgType, T *self, R(T::*handler)(const P &, const msgpack::object &) const, bool unique=false)
 
template<typename T , typename P , typename R >
void register_handler (uint32_t msgType, T *self, R(T::*handler)(const P &, const msgpack::object &), bool unique=false)
 
Napi::Promise process_message (const Napi::CallbackInfo &info)
 
void close ()
 

Private Member Functions

template<typename P , typename R >
void _register_handler (uint32_t msgType, const std::function< R(const P &, const msgpack::object &)> &fn, bool unique=false)
 

Private Attributes

bb::messaging::MessageDispatcher dispatcher
 
std::atomic_bool open = true
 

Detailed Description

Definition at line 11 of file message_processor.hpp.

Member Function Documentation

◆ _register_handler()

template<typename P , typename R >
void bb::nodejs::AsyncMessageProcessor::_register_handler ( uint32_t  msgType,
const std::function< R(const P &, const msgpack::object &)> &  fn,
bool  unique = false 
)
inlineprivate

Definition at line 106 of file message_processor.hpp.

◆ close()

void bb::nodejs::AsyncMessageProcessor::close ( )
inline

Definition at line 99 of file message_processor.hpp.

◆ process_message()

Napi::Promise bb::nodejs::AsyncMessageProcessor::process_message ( const Napi::CallbackInfo &  info)
inline

Definition at line 64 of file message_processor.hpp.

◆ register_handler() [1/6]

template<typename T , typename R >
void bb::nodejs::AsyncMessageProcessor::register_handler ( uint32_t  msgType,
T *  self,
R(T::*)() const  handler,
bool  unique = false 
)
inline

Definition at line 14 of file message_processor.hpp.

◆ register_handler() [2/6]

template<typename T , typename R >
void bb::nodejs::AsyncMessageProcessor::register_handler ( uint32_t  msgType,
T *  self,
R(T::*)()  handler,
bool  unique = false 
)
inline

Definition at line 20 of file message_processor.hpp.

◆ register_handler() [3/6]

template<typename T , typename P , typename R >
void bb::nodejs::AsyncMessageProcessor::register_handler ( uint32_t  msgType,
T *  self,
R(T::*)(const P &) const  handler,
bool  unique = false 
)
inline

Definition at line 27 of file message_processor.hpp.

◆ register_handler() [4/6]

template<typename T , typename P , typename R >
void bb::nodejs::AsyncMessageProcessor::register_handler ( uint32_t  msgType,
T *  self,
R(T::*)(const P &)  handler,
bool  unique = false 
)
inline

Definition at line 33 of file message_processor.hpp.

◆ register_handler() [5/6]

template<typename T , typename P , typename R >
void bb::nodejs::AsyncMessageProcessor::register_handler ( uint32_t  msgType,
T *  self,
R(T::*)(const P &, const msgpack::object &) const  handler,
bool  unique = false 
)
inline

Definition at line 42 of file message_processor.hpp.

◆ register_handler() [6/6]

template<typename T , typename P , typename R >
void bb::nodejs::AsyncMessageProcessor::register_handler ( uint32_t  msgType,
T *  self,
R(T::*)(const P &, const msgpack::object &)  handler,
bool  unique = false 
)
inline

Definition at line 51 of file message_processor.hpp.

Member Data Documentation

◆ dispatcher

bb::messaging::MessageDispatcher bb::nodejs::AsyncMessageProcessor::dispatcher
private

Definition at line 102 of file message_processor.hpp.

◆ open

std::atomic_bool bb::nodejs::AsyncMessageProcessor::open = true
private

Definition at line 103 of file message_processor.hpp.


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