asio-grpc v3.1.0
Asynchronous gRPC with Asio/unified executors
|
I/O object for client-side, generic, streaming rpcs. More...
#include <agrpc/client_rpc.hpp>
Inherits agrpc::detail::ClientRPCBidiStreamingBase< Responder, Executor >.
Classes | |
struct | rebind_executor |
Rebind the ClientRPC to another executor. More... | |
Public Types | |
using | Stub = grpc::GenericStub |
The stub type. | |
Public Member Functions | |
template<class CompletionToken = detail::DefaultCompletionTokenT<Executor>> | |
auto | start (const std::string &method, grpc::GenericStub &stub, CompletionToken &&token=detail::DefaultCompletionTokenT< Executor >{}) |
Start a generic streaming request. More... | |
Static Public Attributes | |
static constexpr agrpc::ClientRPCType | TYPE = agrpc::ClientRPCType::GENERIC_STREAMING |
The rpc type. | |
I/O object for client-side, generic, streaming rpcs.
Executor | The executor type, must be capable of referring to a agrpc::GrpcContext . |
Per-Operation Cancellation
Terminal and partial. Cancellation is performed by invoking grpc::ClientContext::TryCancel. After successful cancellation no further operations may be started on the rpc (except finish
). Operations are also cancelled when the deadline of the rpc has been reached (see grpc::ClientContext::set_deadline).
|
inline |
Start a generic streaming request.
token | A completion token like asio::yield_context or agrpc::use_sender . The completion signature is void(bool) . true means that the rpc was started successfully. If it is false , then call finish to obtain error details. |