GRPC C++  1.24.0
Public Member Functions | Friends
grpc_impl::ServerReader< R > Class Template Reference

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

#include <completion_queue_impl.h>

Public Member Functions

void SendInitialMetadata () override
 See the ServerStreamingInterface.SendInitialMetadata method for semantics. More...
 
bool NextMessageSize (uint32_t *sz) override
 Get an upper bound on the next message size available for reading on this stream. More...
 
bool Read (R *msg) override
 Block to read a message and parse to msg. More...
 
- Public Member Functions inherited from grpc_impl::internal::ServerStreamingInterface
virtual ~ServerStreamingInterface ()
 
- Public Member Functions inherited from grpc_impl::internal::ReaderInterface< R >
virtual ~ReaderInterface ()
 

Friends

template<class ServiceType , class RequestType , class ResponseType >
class ::grpc::internal::ClientStreamingHandler
 

Detailed Description

template<class R>
class grpc_impl::ServerReader< R >

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

Member Function Documentation

◆ NextMessageSize()

template<class R>
bool grpc_impl::ServerReader< R >::NextMessageSize ( uint32_t *  sz)
inlineoverridevirtual

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

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

◆ Read()

template<class R>
bool grpc_impl::ServerReader< R >::Read ( R *  msg)
inlineoverridevirtual

Block to read a message and parse to msg.

Returns true on success. This is thread-safe with respect to Write or 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).

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

◆ SendInitialMetadata()

template<class R>
void grpc_impl::ServerReader< R >::SendInitialMetadata ( )
inlineoverridevirtual

See the ServerStreamingInterface.SendInitialMetadata method for semantics.

Note that initial metadata will be affected by the ServerContext associated with this call.

Implements grpc_impl::internal::ServerStreamingInterface.

Friends And Related Function Documentation

◆ ::grpc::internal::ClientStreamingHandler

template<class R>
template<class ServiceType , class RequestType , class ResponseType >
friend class ::grpc::internal::ClientStreamingHandler
friend

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