Public Member Functions | List of all members
grpc::internal::ReaderInterface< R > Class Template Referenceabstract

An interface that yields a sequence of messages of type R. More...

#include <sync_stream.h>

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

Public Member Functions

virtual bool NextMessageSize (uint32_t *sz)=0
 
virtual bool Read (R *msg)=0
 
virtual ~ReaderInterface ()
 

Detailed Description

template<class R>
class grpc::internal::ReaderInterface< R >

An interface that yields a sequence of messages of type R.

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

Constructor & Destructor Documentation

◆ ~ReaderInterface()

template<class R >
virtual grpc::internal::ReaderInterface< R >::~ReaderInterface ( )
inlinevirtual

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

Member Function Documentation

◆ NextMessageSize()

template<class R >
virtual bool grpc::internal::ReaderInterface< R >::NextMessageSize ( uint32_t sz)
pure virtual

Get an upper bound on the next message size available for reading on this stream.

Implemented in grpc::ServerSplitStreamer< RequestType, ResponseType >, grpc::ServerUnaryStreamer< RequestType, ResponseType >, and grpc::ServerReaderWriter< W, R >.

◆ Read()

template<class R >
virtual bool grpc::internal::ReaderInterface< R >::Read ( R *  msg)
pure virtual

Block to read a message and parse to msg. Returns true on success. This is thread-safe with respect to Write or \WritesDone methods on the same stream. It should not be called concurrently with another Read on the same stream as the order of delivery will not be defined.

Parameters
[out]msgThe read message.
Returns
false when there will be no more incoming messages, either because the other side has called WritesDone() or the stream has failed (or been cancelled).

Implemented in grpc::ServerSplitStreamer< RequestType, ResponseType >, grpc::ServerUnaryStreamer< RequestType, ResponseType >, and grpc::ServerReaderWriter< W, R >.


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


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