asio-grpc v1.4.0
Asynchronous gRPC with Asio/unified executors
|
Client and server-side function object to write to streaming RPCs. More...
#include <agrpc/rpc.hpp>
Public Member Functions | |
template<class Response , class CompletionToken = agrpc::DefaultCompletionToken> | |
auto | operator() (grpc::ServerAsyncWriter< Response > &writer, const Response &response, CompletionToken &&token={}) const noexcept(detail::IS_NOTRHOW_GRPC_INITIATE_COMPLETION_TOKEN< CompletionToken >) |
Write to a server stream. More... | |
template<class Response , class CompletionToken = agrpc::DefaultCompletionToken> | |
auto | operator() (grpc::ServerAsyncWriter< Response > &writer, const Response &response, grpc::WriteOptions options, CompletionToken &&token={}) const noexcept(detail::IS_NOTRHOW_GRPC_INITIATE_COMPLETION_TOKEN< CompletionToken >) |
Write to a server stream. More... | |
template<class Response , class Request , class CompletionToken = agrpc::DefaultCompletionToken> | |
auto | operator() (grpc::ServerAsyncReaderWriter< Response, Request > &reader_writer, const Response &response, CompletionToken &&token={}) const noexcept(detail::IS_NOTRHOW_GRPC_INITIATE_COMPLETION_TOKEN< CompletionToken >) |
Write to a bidirectional server stream. More... | |
template<class Response , class Request , class CompletionToken = agrpc::DefaultCompletionToken> | |
auto | operator() (grpc::ServerAsyncReaderWriter< Response, Request > &reader_writer, const Response &response, grpc::WriteOptions options, CompletionToken &&token={}) const noexcept(detail::IS_NOTRHOW_GRPC_INITIATE_COMPLETION_TOKEN< CompletionToken >) |
Write to a bidirectional server stream. More... | |
template<class Request , class CompletionToken = agrpc::DefaultCompletionToken> | |
auto | operator() (grpc::ClientAsyncWriter< Request > &writer, const Request &request, CompletionToken &&token={}) const noexcept(detail::IS_NOTRHOW_GRPC_INITIATE_COMPLETION_TOKEN< CompletionToken >) |
Write to a client stream. More... | |
template<class Request , class CompletionToken = agrpc::DefaultCompletionToken> | |
auto | operator() (grpc::ClientAsyncWriter< Request > &writer, const Request &request, grpc::WriteOptions options, CompletionToken &&token={}) const noexcept(detail::IS_NOTRHOW_GRPC_INITIATE_COMPLETION_TOKEN< CompletionToken >) |
Write to a client stream. More... | |
template<class Request , class Response , class CompletionToken = agrpc::DefaultCompletionToken> | |
auto | operator() (grpc::ClientAsyncReaderWriter< Request, Response > &reader_writer, const Request &request, CompletionToken &&token={}) const noexcept(detail::IS_NOTRHOW_GRPC_INITIATE_COMPLETION_TOKEN< CompletionToken >) |
Write to a bidirectional client stream. More... | |
template<class Request , class Response , class CompletionToken = agrpc::DefaultCompletionToken> | |
auto | operator() (grpc::ClientAsyncReaderWriter< Request, Response > &reader_writer, const Request &request, grpc::WriteOptions options, CompletionToken &&token={}) const noexcept(detail::IS_NOTRHOW_GRPC_INITIATE_COMPLETION_TOKEN< CompletionToken >) |
Write to a bidirectional client stream. More... | |
Client and server-side function object to write to streaming RPCs.
The examples below are based on the following .proto file:
|
inlinenoexcept |
Write to a bidirectional client stream.
Only one write may be outstanding at any given time. This is thread-safe with respect to read. gRPC does not take ownership or a reference to request
, so it is safe to to deallocate once write returns.
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 |
Write to a bidirectional client stream.
WriteOptions options is used to set the write options of this message, otherwise identical to: operator()(ClientAsyncReaderWriter&, const Request&, CompletionToken&&)
|
inlinenoexcept |
Write to a client stream.
Only one write may be outstanding at any given time. This is thread-safe with respect to read. gRPC does not take ownership or a reference to request
, so it is safe to to deallocate once write returns.
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 |
Write to a client stream.
WriteOptions options is used to set the write options of this message, otherwise identical to: operator()(ClientAsyncWriter&, const Request&, CompletionToken&&)
|
inlinenoexcept |
Write to a bidirectional server stream.
Only one write may be outstanding at any given time. This is thread-safe with respect to read. gRPC does not take ownership or a reference to response
, so it is safe to to deallocate once write returns.
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 |
Write to a bidirectional server stream.
WriteOptions options is used to set the write options of this message, otherwise identical to: operator()(ServerAsyncReaderWriter&, const Response&, CompletionToken&&)
|
inlinenoexcept |
Write to a server stream.
Only one write may be outstanding at any given time. This is thread-safe with respect to read. gRPC does not take ownership or a reference to response
, so it is safe to to deallocate once write returns.
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 |
Write to a server stream.
WriteOptions options is used to set the write options of this message, otherwise identical to: operator()(ServerAsyncWriter&, const Response&, CompletionToken&&)