#include <rpp/rpp.hpp>
#include <grpc++/create_channel.h>
#include <rppgrpc/rppgrpc.hpp>
#include "protocol.grpc.pb.h"
class server :
public TestService::CallbackService
{
grpc::ServerReadReactor<Request>* ClientSide(grpc::CallbackServerContext* , Response* ) override
{
reactor->get_observable().subscribe([](const Request&) {}, []() { std::cout << "DONE" << std::endl; });
return reactor;
}
grpc::ServerBidiReactor<Request, Response>* Bidirectional(grpc::CallbackServerContext* ) override
{
reactor->get_observable().subscribe([](const Request&) {}, []() { std::cout << "DONE" << std::endl; });
reactor->get_observer().on_next(Response{});
return reactor;
}
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;
}
};
int main()
{
return 0;
}
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 server_reactor.cpp:13