asio-grpc v3.3.0
Asynchronous gRPC with Asio/unified executors
Loading...
Searching...
No Matches
agrpc::detail::ReadFn Struct Reference

Server/ClientRPC.read in form of a function object. More...

#include <agrpc/read.hpp>

Public Member Functions

template<auto RequestRPC, class Traits , class Executor , class CompletionToken = detail::DefaultCompletionTokenT<Executor>>
decltype(auto) operator() (agrpc::ServerRPC< RequestRPC, Traits, Executor > &rpc, typename agrpc::ServerRPC< RequestRPC, Traits, Executor >::Request &req, CompletionToken &&token=CompletionToken{}) const noexcept(noexcept(rpc.read(req, static_cast< CompletionToken && >(token))))
 Read from a ServerRPC.
 
template<auto PrepareAsync, class Executor , class CompletionToken = detail::DefaultCompletionTokenT<Executor>>
decltype(auto) operator() (agrpc::ClientRPC< PrepareAsync, Executor > &rpc, typename agrpc::ClientRPC< PrepareAsync, Executor >::Response &response, CompletionToken &&token=CompletionToken{}) const noexcept(noexcept(rpc.read(response, static_cast< CompletionToken && >(token))))
 Read from a Client.
 

Detailed Description

Server/ClientRPC.read in form of a function object.

Member Function Documentation

◆ operator()() [1/2]

template<auto RequestRPC, class Traits , class Executor , class CompletionToken = detail::DefaultCompletionTokenT<Executor>>
decltype(auto) agrpc::detail::ReadFn::operator() ( agrpc::ServerRPC< RequestRPC, Traits, Executor > & rpc,
typename agrpc::ServerRPC< RequestRPC, Traits, Executor >::Request & req,
CompletionToken && token = CompletionToken{} ) const
inlinenoexcept

Read from a ServerRPC.

Equivalent to performing rpc.read(req, token).

Since
2.7.0

◆ operator()() [2/2]

template<auto PrepareAsync, class Executor , class CompletionToken = detail::DefaultCompletionTokenT<Executor>>
decltype(auto) agrpc::detail::ReadFn::operator() ( agrpc::ClientRPC< PrepareAsync, Executor > & rpc,
typename agrpc::ClientRPC< PrepareAsync, Executor >::Response & response,
CompletionToken && token = CompletionToken{} ) const
inlinenoexcept

Read from a Client.

Equivalent to performing rpc.read(response, token).

Since
2.7.0