asio-grpc v3.1.0
Asynchronous gRPC with Asio/unified executors
|
I/O object for server-side, bidirectional-streaming rpcs. More...
#include <agrpc/server_rpc.hpp>
Inherits agrpc::detail::ServerRPCBidiStreamingBase< Responder, Traits, Executor >.
Classes | |
struct | rebind_executor |
Rebind the ServerRPC to another executor. More... | |
Public Types | |
using | Ptr = agrpc::ServerRPCPtr< ServerRPC > |
ServerRPCPtr specialized on this type. | |
Public Member Functions | |
ServerRPC ()=delete | |
Deleted default constructor. | |
Static Public Member Functions | |
static constexpr std::string_view | service_name () noexcept |
Name of the gRPC service. More... | |
static constexpr std::string_view | method_name () noexcept |
Name of the gRPC method. More... | |
Static Public Attributes | |
static constexpr agrpc::ServerRPCType | TYPE = agrpc::ServerRPCType::BIDIRECTIONAL_STREAMING |
The rpc type. | |
I/O object for server-side, bidirectional-streaming rpcs.
Use one of the agrpc::register_
functions to set up request handling.
Example:
Based on .proto
file:
RequestUnary | A pointer to the generated gRPC method. |
Traits | A type used to customize this rpc. See agrpc::DefaultServerRPCTraits . |
Executor | The executor type, must be capable of referring to a agrpc::GrpcContext . |
Per-Operation Cancellation
(except wait_for_done
) Terminal and partial. Cancellation is performed by invoking grpc::ServerContext::TryCancel. After successful cancellation no further operations should be started on the rpc. Operations are also cancelled when the deadline of the rpc has been reached.
|
inlinestaticconstexprnoexcept |
Name of the gRPC service.
Equal to the generated Service::service_full_name()
.
E.g. for the .proto
schema
the return value would be "example.v1.Example"
.
|
inlinestaticconstexprnoexcept |
Name of the gRPC method.
E.g. for agrpc::ServerRPC<&example::Example::AsyncService::RequestMyMethod>
the return value would be "MyMethod"
.