asio-grpc v1.5.0
Asynchronous gRPC with Asio/unified executors
|
Server-side function object to send initial metadata for RPCs. More...
#include <agrpc/rpc.hpp>
Public Member Functions | |
template<class Responder , class CompletionToken = agrpc::DefaultCompletionToken> | |
auto | operator() (Responder &responder, CompletionToken &&token={}) const noexcept(detail::IS_NOTRHOW_GRPC_INITIATE_COMPLETION_TOKEN< CompletionToken >) |
Send initial metadata. More... | |
Server-side function object to send initial metadata for RPCs.
The examples below are based on the following .proto file:
|
inlinenoexcept |
Send initial metadata.
Request notification of the sending of initial metadata to the client.
This call is optional, but if it is used, it cannot be used concurrently with or after the Finish method.
Example:
responder | grpc::ServerAsyncResponseWriter , grpc::ServerAsyncReader , grpc::ServerAsyncWriter or grpc::ServerAsyncReaderWriter |
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). |