RPP's based implementation for grpc server write reactor.
More...
#include <server_reactor.hpp>
RPP's based implementation for grpc server write reactor.
To use it you need:
- create it via
new
operator
- return it from write-based method of CallbackService interface
- reactor provides
reactor->get_observable()
method but such as observable emits nothing and can be used only to be notified about completion/error
- to pass values TO stream you can emit values to observer obtained via
reactor->get_observer()
grpc::ServerWriteReactor<Response>* ServerSide(grpc::CallbackServerContext* , const Request* ) override
{
reactor->get_observable().subscribe([](
rpp::utils::none) {}, []() { std::cout <<
"DONE" << std::endl; });
reactor->get_observer().on_next(Response{});
return reactor;
}
- Examples
- server_reactor.cpp.
The documentation for this class was generated from the following files: