hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
grpc_channel_builder.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_GRPC_CHANNEL_BUILDER_HPP
7 #define IROHA_GRPC_CHANNEL_BUILDER_HPP
8 
9 #include <grpc++/grpc++.h>
10 
11 namespace iroha {
12  namespace network {
13 
21  template <typename T>
22  auto createClient(const grpc::string& address) {
23  // in order to bypass built-in limitation of gRPC message size
24  grpc::ChannelArguments args;
25  args.SetMaxSendMessageSize(INT_MAX);
26  args.SetMaxReceiveMessageSize(INT_MAX);
27 
28  return
29  T::NewStub(grpc::CreateCustomChannel(
30  address, grpc::InsecureChannelCredentials(), args));
31  }
32  } // namespace network
33 } // namespace iroha
34 
35 #endif // IROHA_GRPC_CHANNEL_BUILDER_HPP
string(REPLACE".""/"CMAKE_SWIG_OUTDIR ${SWIG_JAVA_PKG}) else() set(CMAKE_SWIG_FLAGS"") endif() myswig_add_library(irohajava LANGUAGE java SOURCES bindings.i) unset(CMAKE_SWIG_FLAGS) swig_link_libraries(irohajava $
Definition: CMakeLists.txt:54
Definition: block_query.hpp:16
auto createClient(const grpc::string &address)
Definition: grpc_channel_builder.hpp:22