asio-grpc v1.5.0
Asynchronous gRPC with Asio/unified executors
|
Client-side function object to signal WritesDone to streaming RPCs. More...
#include <agrpc/rpc.hpp>
Public Member Functions | |
template<class Request , class CompletionToken = agrpc::DefaultCompletionToken> | |
auto | operator() (grpc::ClientAsyncWriter< Request > &writer, CompletionToken &&token={}) const noexcept(detail::IS_NOTRHOW_GRPC_INITIATE_COMPLETION_TOKEN< CompletionToken >) |
Signal WritesDone to a client stream. More... | |
template<class Request , class Response , class CompletionToken = agrpc::DefaultCompletionToken> | |
auto | operator() (grpc::ClientAsyncReaderWriter< Request, Response > &reader_writer, CompletionToken &&token={}) const noexcept(detail::IS_NOTRHOW_GRPC_INITIATE_COMPLETION_TOKEN< CompletionToken >) |
Signal WritesDone to a bidirectional client stream. More... | |
Client-side function object to signal WritesDone to streaming RPCs.
The examples below are based on the following .proto file:
|
inlinenoexcept |
Signal WritesDone to a bidirectional client stream.
Signal the client is done with the writes (half-close the client stream). Thread-safe with respect to read.
Example:
token | A completion token like asio::yield_context or the one created by agrpc::use_sender . The completion signature is void(bool) . true means that the data/metadata/status/etc is going to go to the wire. If it is false , it is not going to the wire because the call is already dead (i.e., canceled, deadline expired, other side dropped the channel, etc). |
|
inlinenoexcept |
Signal WritesDone to a client stream.
Signal the client is done with the writes (half-close the client stream). Thread-safe with respect to read.
Example:
token | A completion token like asio::yield_context or the one created by agrpc::use_sender . The completion signature is void(bool) . true means that the data/metadata/status/etc is going to go to the wire. If it is false , it is not going to the wire because the call is already dead (i.e., canceled, deadline expired, other side dropped the channel, etc). |