Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
grpc::ClientAsyncReader< R > Class Template Referencefinal

#include <async_stream.h>

Inheritance diagram for grpc::ClientAsyncReader< R >:
Inheritance graph
[legend]

Public Member Functions

void Finish (grpc::Status *status, void *tag) override
 
void Read (R *msg, void *tag) override
 
void ReadInitialMetadata (void *tag) override
 
void StartCall (void *tag) override
 
- Public Member Functions inherited from grpc::internal::ClientAsyncStreamingInterface
virtual ~ClientAsyncStreamingInterface ()
 
- Public Member Functions inherited from grpc::internal::AsyncReaderInterface< R >
virtual ~AsyncReaderInterface ()
 

Static Public Member Functions

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

Private Member Functions

template<class W >
 ClientAsyncReader (grpc::internal::Call call, grpc::ClientContext *context, const W &request, bool start, void *tag)
 
void StartCallInternal (void *tag)
 

Private Attributes

grpc::internal::Call call_
 
grpc::ClientContextcontext_
 
grpc::internal::CallOpSet< grpc::internal::CallOpRecvInitialMetadata, grpc::internal::CallOpClientRecvStatusfinish_ops_
 
grpc::internal::CallOpSet< grpc::internal::CallOpSendInitialMetadata, grpc::internal::CallOpSendMessage, grpc::internal::CallOpClientSendCloseinit_ops_
 
grpc::internal::CallOpSet< grpc::internal::CallOpRecvInitialMetadatameta_ops_
 
grpc::internal::CallOpSet< grpc::internal::CallOpRecvInitialMetadata, grpc::internal::CallOpRecvMessage< R > > read_ops_
 
bool started_
 

Friends

class internal::ClientAsyncReaderFactory< R >
 

Detailed Description

template<class R>
class grpc::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.

Definition at line 199 of file grpcpp/impl/codegen/async_stream.h.

Constructor & Destructor Documentation

◆ ClientAsyncReader()

template<class R >
template<class W >
grpc::ClientAsyncReader< R >::ClientAsyncReader ( grpc::internal::Call  call,
grpc::ClientContext context,
const W request,
bool  start,
void *  tag 
)
inlineprivate

Definition at line 264 of file grpcpp/impl/codegen/async_stream.h.

Member Function Documentation

◆ Finish()

template<class R >
void grpc::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::internal::ClientAsyncStreamingInterface.

Definition at line 251 of file grpcpp/impl/codegen/async_stream.h.

◆ operator delete() [1/2]

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

Definition at line 202 of file grpcpp/impl/codegen/async_stream.h.

◆ operator delete() [2/2]

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

Definition at line 211 of file grpcpp/impl/codegen/async_stream.h.

◆ Read()

template<class R >
void grpc::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::internal::AsyncReaderInterface< R >.

Definition at line 236 of file grpcpp/impl/codegen/async_stream.h.

◆ ReadInitialMetadata()

template<class R >
void grpc::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::internal::ClientAsyncStreamingInterface.

Definition at line 227 of file grpcpp/impl/codegen/async_stream.h.

◆ StartCall()

template<class R >
void grpc::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::internal::ClientAsyncStreamingInterface.

Definition at line 213 of file grpcpp/impl/codegen/async_stream.h.

◆ StartCallInternal()

template<class R >
void grpc::ClientAsyncReader< R >::StartCallInternal ( void *  tag)
inlineprivate

Definition at line 277 of file grpcpp/impl/codegen/async_stream.h.

Friends And Related Function Documentation

◆ internal::ClientAsyncReaderFactory< R >

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

Definition at line 262 of file grpcpp/impl/codegen/async_stream.h.

Member Data Documentation

◆ call_

template<class R >
grpc::internal::Call grpc::ClientAsyncReader< R >::call_
private

Definition at line 285 of file grpcpp/impl/codegen/async_stream.h.

◆ context_

template<class R >
grpc::ClientContext* grpc::ClientAsyncReader< R >::context_
private

Definition at line 284 of file grpcpp/impl/codegen/async_stream.h.

◆ finish_ops_

Definition at line 298 of file grpcpp/impl/codegen/async_stream.h.

◆ init_ops_

Definition at line 290 of file grpcpp/impl/codegen/async_stream.h.

◆ meta_ops_

Definition at line 292 of file grpcpp/impl/codegen/async_stream.h.

◆ read_ops_

Definition at line 295 of file grpcpp/impl/codegen/async_stream.h.

◆ started_

template<class R >
bool grpc::ClientAsyncReader< R >::started_
private

Definition at line 286 of file grpcpp/impl/codegen/async_stream.h.


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


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:30