hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
iroha::network::AsyncGrpcClient< Response > Class Template Reference

#include "async_grpc_client.hpp"

Collaboration diagram for iroha::network::AsyncGrpcClient< Response >:
Collaboration graph

Classes

struct  AsyncClientCall
 

Public Member Functions

 AsyncGrpcClient (logger::LoggerPtr log)
 
void asyncCompleteRpc ()
 
 ~AsyncGrpcClient ()
 
template<typename F >
void Call (F &&lambda, std::function< void(grpc::Status &, Response &)> on_response={})
 

Public Attributes

grpc::CompletionQueue cq_
 
std::thread thread_
 

Detailed Description

template<typename Response>
class iroha::network::AsyncGrpcClient< Response >

Asynchronous gRPC client which does no processing of server responses

Template Parameters
Responsetype of server response

Constructor & Destructor Documentation

◆ AsyncGrpcClient()

template<typename Response>
iroha::network::AsyncGrpcClient< Response >::AsyncGrpcClient ( logger::LoggerPtr  log)
inlineexplicit

◆ ~AsyncGrpcClient()

template<typename Response>
iroha::network::AsyncGrpcClient< Response >::~AsyncGrpcClient ( )
inline

Member Function Documentation

◆ asyncCompleteRpc()

template<typename Response>
void iroha::network::AsyncGrpcClient< Response >::asyncCompleteRpc ( )
inline

Listen to gRPC server responses

◆ Call()

template<typename Response>
template<typename F >
void iroha::network::AsyncGrpcClient< Response >::Call ( F &&  lambda,
std::function< void(grpc::Status &, Response &)>  on_response = {} 
)
inline

Universal method to perform all needed sends

Template Parameters
lambdawhich must return unique pointer to ClientAsyncResponseReader<Response> object
Here is the caller graph for this function:

Member Data Documentation

◆ cq_

template<typename Response>
grpc::CompletionQueue iroha::network::AsyncGrpcClient< Response >::cq_

◆ thread_

template<typename Response>
std::thread iroha::network::AsyncGrpcClient< Response >::thread_

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