asio-grpc v3.1.0
Asynchronous gRPC with Asio/unified executors
|
#include <agrpc/detail/client_rpc_base.hpp>
Public Types | |
using | executor_type = Executor |
The executor type. | |
Public Member Functions | |
ClientRPCBase (agrpc::GrpcContext &grpc_context) | |
Construct from a GrpcContext. | |
template<class ClientContextInitFunction > | |
ClientRPCBase (agrpc::GrpcContext &grpc_context, ClientContextInitFunction &&init_function) | |
Construct from a GrpcContext and an init function. More... | |
ClientRPCBase (const Executor &executor) | |
Construct from an executor. | |
template<class ClientContextInitFunction > | |
ClientRPCBase (const Executor &executor, ClientContextInitFunction &&init_function) | |
Construct from an executor and init function. More... | |
template<class CompletionToken = detail::DefaultCompletionTokenT<Executor>> | |
auto | read_initial_metadata (CompletionToken &&token=detail::DefaultCompletionTokenT< Executor >{}) |
Read initial metadata. More... | |
const executor_type & | get_executor () const noexcept |
Get the executor. More... | |
const executor_type & | get_scheduler () const noexcept |
Get the scheduler. More... | |
grpc::ClientContext & | context () |
Get the underlying grpc::ClientContext | |
const grpc::ClientContext & | context () const |
Get the underlying grpc::ClientContext (const overload) | |
void | cancel () noexcept |
Cancel this RPC. More... | |
ServerRPC base.
|
inline |
Construct from a GrpcContext and an init function.
ClientContextInitFunction | A function with signature void(grpc::ClientContext&) which will be invoked during construction. It can, for example, be used to set this rpc's deadline. |
|
inline |
Construct from an executor and init function.
ClientContextInitFunction | A function with signature void(grpc::ClientContext&) which will be invoked during construction. It can, for example, be used to set this rpc's deadline. |
|
inline |
Read initial metadata.
Request notification of the reading of the initial metadata.
This call is optional.
Side effect:
agrpc::send_initial_metadata
) but waits for a message from the client instead then this function won't complete until write()
is called.token | A completion token like asio::yield_context or agrpc::use_sender . The completion signature is void(bool) . true indicates that the metadata was read. If it is false , then the call is dead. |
|
inlinenoexceptinherited |
Get the executor.
Thread-safe
|
inlinenoexceptinherited |
Get the scheduler.
Thread-safe
|
inlinenoexceptinherited |