MCPcopy Create free account
hub / github.com/3rdparty/libprocess / Connection

Class Connection

include/process/grpc.hpp:112–125  ·  view source on GitHub ↗

* A copyable interface to manage a connection to a gRPC server. All * `Connection` copies share the same gRPC channel which is thread safe. Note * that the actual connection is established lazily by the gRPC library at the * time an RPC is made to the channel. */

Source from the content-addressed store, hash-verified

110 * time an RPC is made to the channel.
111 */
112class Connection
113{
114public:
115 Connection(
116 const std::string& uri,
117 const std::shared_ptr<::grpc::ChannelCredentials>& credentials =
118 ::grpc::InsecureChannelCredentials())
119 : channel(::grpc::CreateChannel(uri, credentials)) {}
120
121 explicit Connection(std::shared_ptr<::grpc::Channel> _channel)
122 : channel(std::move(_channel)) {}
123
124 const std::shared_ptr<::grpc::Channel> channel;
125};
126
127
128/**

Callers 2

connectFunction · 0.50
startupMethod · 0.50

Calls

no outgoing calls

Tested by 1

startupMethod · 0.40