ReactivePlusPlus
ReactiveX implementation for C++20
Loading...
Searching...
No Matches
rppgrpc::server_read_reactor< Request > Class Template Referencefinal

RPP's based implementation for grpc server read reactor. More...

#include <server_reactor.hpp>

Detailed Description

template<rpp::constraint::decayed_type Request>
class rppgrpc::server_read_reactor< Request >

RPP's based implementation for grpc server read reactor.

To use it you need:

  • create it via new operator
  • return it from read-based method of CallbackService interface
  • to access values FROM stream you can subscribe to observable obtained via reactor->get_observable() (same observable WOULD emit on_completed in case of successful stream termination and on_error in case of some errors with grpc stream)
grpc::ServerReadReactor<Request>* ClientSide(grpc::CallbackServerContext* /*context*/, Response* /*response*/) override
{
const auto reactor = new rppgrpc::server_read_reactor<Request>();
reactor->get_observable().subscribe([](const Request&) {}, []() { std::cout << "DONE" << std::endl; });
return reactor;
}
Examples
server_reactor.cpp.

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