GRPC C++  1.30.0
Public Member Functions | Static Public Member Functions | Friends
grpc_impl::ClientAsyncReader< R > Class Template Referencefinal

Async client-side API for doing server-streaming RPCs, where the incoming message stream coming from the server has messages of type R. More...

#include <async_stream_impl.h>

Public Member Functions

void StartCall (void *tag) override
 Start the call that was set up by the constructor, but only if the constructor was invoked through the "Prepare" API which doesn't actually start the call. More...
 
void ReadInitialMetadata (void *tag) override
 See the ClientAsyncStreamingInterface.ReadInitialMetadata method for semantics. More...
 
void Read (R *msg, void *tag) override
 Read a message of type R into msg. More...
 
void Finish (::grpc::Status *status, void *tag) override
 See the ClientAsyncStreamingInterface.Finish method for semantics. More...
 
- Public Member Functions inherited from grpc_impl::internal::ClientAsyncStreamingInterface
virtual ~ClientAsyncStreamingInterface ()
 
- Public Member Functions inherited from grpc_impl::internal::AsyncReaderInterface< R >
virtual ~AsyncReaderInterface ()
 

Static Public Member Functions

static void operator delete (void *, std::size_t size)
 
static void operator delete (void *, void *)
 

Friends

class internal::ClientAsyncReaderFactory< R >
 

Detailed Description

template<class R>
class grpc_impl::ClientAsyncReader< R >

Async client-side API for doing server-streaming RPCs, where the incoming message stream coming from the server has messages of type R.

Member Function Documentation

◆ Finish()

template<class R >
void grpc_impl::ClientAsyncReader< R >::Finish ( ::grpc::Status status,
void *  tag 
)
inlineoverridevirtual

See the ClientAsyncStreamingInterface.Finish method for semantics.

Side effect:

  • the ClientContext associated with this call is updated with possible initial and trailing metadata received from the server.

Implements grpc_impl::internal::ClientAsyncStreamingInterface.

◆ operator delete() [1/2]

template<class R >
static void grpc_impl::ClientAsyncReader< R >::operator delete ( void *  ,
std::size_t  size 
)
inlinestatic

◆ operator delete() [2/2]

template<class R >
static void grpc_impl::ClientAsyncReader< R >::operator delete ( void *  ,
void *   
)
inlinestatic

◆ Read()

template<class R >
void grpc_impl::ClientAsyncReader< R >::Read ( R *  msg,
void *  tag 
)
inlineoverridevirtual

Read a message of type R into msg.

Completion will be notified by tag on the associated completion queue. This is thread-safe with respect to Write or WritesDone methods. It should not be called concurrently with other streaming APIs on the same stream. It is not meaningful to call it concurrently with another AsyncReaderInterface::Read on the same stream since reads on the same stream are delivered in order.

Parameters
[out]msgWhere to eventually store the read message.
[in]tagThe tag identifying the operation.

Side effect: note that this method attempt to receive initial metadata for a stream if it hasn't yet been received.

Implements grpc_impl::internal::AsyncReaderInterface< R >.

◆ ReadInitialMetadata()

template<class R >
void grpc_impl::ClientAsyncReader< R >::ReadInitialMetadata ( void *  tag)
inlineoverridevirtual

See the ClientAsyncStreamingInterface.ReadInitialMetadata method for semantics.

Side effect:

  • upon receiving initial metadata from the server, the ClientContext associated with this call is updated, and the calling code can access the received metadata through the ClientContext.

Implements grpc_impl::internal::ClientAsyncStreamingInterface.

◆ StartCall()

template<class R >
void grpc_impl::ClientAsyncReader< R >::StartCall ( void *  tag)
inlineoverridevirtual

Start the call that was set up by the constructor, but only if the constructor was invoked through the "Prepare" API which doesn't actually start the call.

Implements grpc_impl::internal::ClientAsyncStreamingInterface.

Friends And Related Function Documentation

◆ internal::ClientAsyncReaderFactory< R >

template<class R >
friend class internal::ClientAsyncReaderFactory< R >
friend

The documentation for this class was generated from the following file: