19 #ifndef MIR_CLIENT_RPC_MIR_BASIC_RPC_CHANNEL_H_
20 #define MIR_CLIENT_RPC_MIR_BASIC_RPC_CHANNEL_H_
22 #include <google/protobuf/service.h>
23 #include <google/protobuf/descriptor.h>
58 mir::protobuf::wire::Invocation
const&
invoke,
59 google::protobuf::Message* response,
60 std::shared_ptr<google::protobuf::Closure>
const& complete);
74 google::protobuf::Message* response,
75 std::shared_ptr<google::protobuf::Closure>
const& target)
76 : response(response), complete(target) {}
79 : response(0), complete() {}
81 google::protobuf::Message* response;
82 std::shared_ptr<google::protobuf::Closure> complete;
85 std::mutex
mutable mutex;
86 std::map<int, PendingCall> pending_calls;
87 std::shared_ptr<RpcReport>
const rpc_report;
99 google::protobuf::MethodDescriptor
const* method,
100 google::protobuf::Message
const* request,
101 size_t num_side_channel_fds);
105 std::atomic<int> next_message_id;
All things Mir.
Definition: buffer_stream.h:37
int next_id()
Definition: mir_basic_rpc_channel.cpp:127
void invoke(Self *self, Server *server, void(ServerX::*function)(::google::protobuf::RpcController *controller, const ParameterMessage *request, ResultMessage *response,::google::protobuf::Closure *done), Invocation const &invocation)
Definition: template_protobuf_message_processor.h:47
MirBasicRpcChannel()
Definition: mir_basic_rpc_channel.cpp:96
Definition: mir_basic_rpc_channel.h:52
void complete_response(mir::protobuf::wire::Result &result)
Definition: mir_basic_rpc_channel.cpp:48
Definition: mir_basic_rpc_channel.h:91
~MirBasicRpcChannel()
Definition: mir_basic_rpc_channel.cpp:101
std::vector< uint8_t > SendBuffer
Definition: mir_basic_rpc_channel.h:50
mir::protobuf::wire::Invocation invocation_for(google::protobuf::MethodDescriptor const *method, google::protobuf::Message const *request, size_t num_side_channel_fds)
Definition: mir_basic_rpc_channel.cpp:106
void force_completion()
Definition: mir_basic_rpc_channel.cpp:74
void save_completion_details(mir::protobuf::wire::Invocation const &invoke, google::protobuf::Message *response, std::shared_ptr< google::protobuf::Closure > const &complete)
Definition: mir_basic_rpc_channel.cpp:38
PendingCallCache(std::shared_ptr< RpcReport > const &rpc_report)
Definition: mir_basic_rpc_channel.cpp:32
bool empty() const
Definition: mir_basic_rpc_channel.cpp:88