asio-grpc v3.1.0
Asynchronous gRPC with Asio/unified executors
|
I/O object for server-side, generic 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 Attributes | |
static constexpr agrpc::ServerRPCType | TYPE = agrpc::ServerRPCType::GENERIC |
The rpc type. | |
I/O object for server-side, generic 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.