Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
grpc::ClientReader< R > Class Template Reference

#include <channel_interface.h>

Public Member Functions

grpc::Status Finish () override
 
bool NextMessageSize (uint32_t *sz) override
 
bool Read (R *msg) override
 
void WaitForInitialMetadata () override
 

Private Member Functions

template<class W >
 ClientReader (grpc::ChannelInterface *channel, const grpc::internal::RpcMethod &method, grpc::ClientContext *context, const W &request)
 

Private Attributes

grpc::internal::Call call_
 
grpc::ClientContextcontext_
 
grpc::CompletionQueue cq_
 

Friends

class internal::ClientReaderFactory< R >
 

Detailed Description

template<class R>
class grpc::ClientReader< R >

Synchronous (blocking) client-side API for doing server-streaming RPCs, where the stream of messages coming from the server has messages of type R.

Definition at line 31 of file grpcpp/impl/codegen/channel_interface.h.

Constructor & Destructor Documentation

◆ ClientReader()

template<class R >
template<class W >
grpc::ClientReader< R >::ClientReader ( grpc::ChannelInterface channel,
const grpc::internal::RpcMethod method,
grpc::ClientContext context,
const W request 
)
inlineprivate

Block to create a stream and write the initial metadata and request out. Note that context will be used to fill in custom initial metadata used to send to the server when starting the call.

Definition at line 248 of file grpcpp/impl/codegen/sync_stream.h.

Member Function Documentation

◆ Finish()

template<class R >
grpc::Status grpc::ClientReader< R >::Finish ( )
inlineoverride

See the ClientStreamingInterface.Finish method for semantics.

Side effect: The ClientContext associated with this call is updated with possible metadata received from the server.

Definition at line 224 of file grpcpp/impl/codegen/sync_stream.h.

◆ NextMessageSize()

template<class R >
bool grpc::ClientReader< R >::NextMessageSize ( uint32_t sz)
inlineoverride

Definition at line 196 of file grpcpp/impl/codegen/sync_stream.h.

◆ Read()

template<class R >
bool grpc::ClientReader< R >::Read ( R *  msg)
inlineoverride

See the ReaderInterface.Read method for semantics. Side effect: This also receives initial metadata from the server, if not already received (if initial metadata is received, it can be then accessed through the ClientContext associated with this call).

Definition at line 207 of file grpcpp/impl/codegen/sync_stream.h.

◆ WaitForInitialMetadata()

template<class R >
void grpc::ClientReader< R >::WaitForInitialMetadata ( )
inlineoverride

See the ClientStreamingInterface.WaitForInitialMetadata method for semantics. Once complete, the initial metadata read from the server will be accessible through the ClientContext used to construct this object.

status ignored

Definition at line 187 of file grpcpp/impl/codegen/sync_stream.h.

Friends And Related Function Documentation

◆ internal::ClientReaderFactory< R >

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

Definition at line 239 of file grpcpp/impl/codegen/sync_stream.h.

Member Data Documentation

◆ call_

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

Definition at line 242 of file grpcpp/impl/codegen/sync_stream.h.

◆ context_

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

Definition at line 240 of file grpcpp/impl/codegen/sync_stream.h.

◆ cq_

template<class R >
grpc::CompletionQueue grpc::ClientReader< R >::cq_
private

Definition at line 241 of file grpcpp/impl/codegen/sync_stream.h.


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


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