13#include <rpp/observables/fwd.hpp>
15#include <grpcpp/support/server_callback.h>
16#include <rppgrpc/details/base.hpp>
17#include <rppgrpc/fwd.hpp>
18#include <rppgrpc/utils/exceptions.hpp>
36 template<rpp::constra
int::decayed_type Request, rpp::constra
int::decayed_type Response>
41 using Base = grpc::ServerBidiReactor<Request, Response>;
46 Base::StartSendInitialMetadata();
54 void start_write(
const Response& v)
override
59 void start_read(Request& data)
override
61 Base::StartRead(&data);
64 void finish_writes(
const grpc::Status& status)
override
69 void OnReadDone(
bool ok)
override
77 void OnWriteDone(
bool ok)
override
85 void OnDone()
override
93 void OnCancel()
override
98 Base::Finish(grpc::Status::CANCELLED);
114 template<rpp::constra
int::decayed_type Response>
119 using Base = grpc::ServerWriteReactor<Response>;
124 Base::StartSendInitialMetadata();
131 void start_write(
const Response& v)
override
133 Base::StartWrite(&v);
138 void finish_writes(
const grpc::Status& status)
override
140 Base::Finish(status);
143 void OnWriteDone(
bool ok)
override
147 Base::Finish(grpc::Status::OK);
154 void OnDone()
override
162 void OnCancel()
override
167 Base::Finish(grpc::Status::CANCELLED);
182 template<rpp::constra
int::decayed_type Request>
186 using Base = grpc::ServerReadReactor<Request>;
191 Base::StartSendInitialMetadata();
198 void start_read(Request& data)
override
200 Base::StartRead(&data);
203 void OnReadDone(
bool ok)
override
207 Base::Finish(grpc::Status::OK);
214 void OnDone()
override
221 void OnCancel()
override
RPP's based implementation for grpc server bidirectional reactor.
Definition server_reactor.hpp:40
RPP's based implementation for grpc server read reactor.
Definition server_reactor.hpp:185
RPP's based implementation for grpc server write reactor.
Definition server_reactor.hpp:118
Definition exceptions.hpp:18