CatapultServer  v0.5.0.1 (Elephant)
catapult::api::RemoteRequestDispatcher Class Reference

Dispatches requests to a remote node. More...

Collaboration diagram for catapult::api::RemoteRequestDispatcher:

Public Member Functions

 RemoteRequestDispatcher (ionet::PacketIo &io)
 Creates a remote request dispatcher around io. More...
 
template<typename TFuncTraits , typename... TArgs>
thread::future< typename TFuncTraits::ResultType > dispatch (const TFuncTraits &traits, TArgs &&... args)
 Dispatches args to the underlying io. More...
 

Private Types

enum  RemoteChainResult { RemoteChainResult::Success, RemoteChainResult::Write_Error, RemoteChainResult::Read_Error, RemoteChainResult::Malformed_Packet }
 

Private Member Functions

template<typename TFuncTraits , typename TCallback >
void send (const TFuncTraits &traits, const ionet::PacketPayload &packetPayload, const TCallback &callback)
 

Static Private Member Functions

static constexpr const char * GetErrorMessage (RemoteChainResult result)
 

Private Attributes

ionet::PacketIom_io
 

Detailed Description

Dispatches requests to a remote node.

Member Enumeration Documentation

◆ RemoteChainResult

Enumerator
Success 
Write_Error 
Read_Error 
Malformed_Packet 

Constructor & Destructor Documentation

◆ RemoteRequestDispatcher()

catapult::api::RemoteRequestDispatcher::RemoteRequestDispatcher ( ionet::PacketIo io)
inlineexplicit

Creates a remote request dispatcher around io.

Member Function Documentation

◆ dispatch()

template<typename TFuncTraits , typename... TArgs>
thread::future<typename TFuncTraits::ResultType> catapult::api::RemoteRequestDispatcher::dispatch ( const TFuncTraits &  traits,
TArgs &&...  args 
)
inline

Dispatches args to the underlying io.

Here is the call graph for this function:

◆ GetErrorMessage()

static constexpr const char* catapult::api::RemoteRequestDispatcher::GetErrorMessage ( RemoteChainResult  result)
inlinestaticconstexprprivate
Here is the caller graph for this function:

◆ send()

template<typename TFuncTraits , typename TCallback >
void catapult::api::RemoteRequestDispatcher::send ( const TFuncTraits &  traits,
const ionet::PacketPayload packetPayload,
const TCallback &  callback 
)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_io

ionet::PacketIo& catapult::api::RemoteRequestDispatcher::m_io
private

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