GRPC C++  1.3.0
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
grpc::ServerReaderWriter< W, R > Class Template Referencefinal

#include <sync_stream.h>

Public Member Functions

 ServerReaderWriter (Call *call, ServerContext *ctx)
 
void SendInitialMetadata () override
 Blocking send initial metadata to client. More...
 
bool NextMessageSize (uint32_t *sz) override
 Upper bound on the next message size available for reading on this stream. More...
 
bool Read (R *msg) override
 Blocking read a message and parse to msg. More...
 
bool Write (const W &msg, WriteOptions options) override
 Blocking write msg to the stream with WriteOptions options. More...
 
- Public Member Functions inherited from grpc::ServerStreamingInterface
virtual ~ServerStreamingInterface ()
 
- Public Member Functions inherited from grpc::WriterInterface< W >
virtual ~WriterInterface ()
 
bool Write (const W &msg)
 Blocking write msg to the stream with default write options. More...
 
void WriteLast (const W &msg, WriteOptions options)
 Write msg and coalesce it with the writing of trailing metadata, using WriteOptions options. More...
 
- Public Member Functions inherited from grpc::ReaderInterface< R >
virtual ~ReaderInterface ()
 

Constructor & Destructor Documentation

template<class W , class R >
grpc::ServerReaderWriter< W, R >::ServerReaderWriter ( Call call,
ServerContext ctx 
)
inline

Member Function Documentation

template<class W , class R >
bool grpc::ServerReaderWriter< W, R >::NextMessageSize ( uint32_t *  sz)
inlineoverridevirtual

Upper bound on the next message size available for reading on this stream.

Implements grpc::ReaderInterface< R >.

template<class W , class R >
bool grpc::ServerReaderWriter< W, R >::Read ( R *  msg)
inlineoverridevirtual

Blocking 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::ReaderInterface< R >.

template<class W , class R >
void grpc::ServerReaderWriter< W, R >::SendInitialMetadata ( )
inlineoverridevirtual

Blocking send initial metadata to client.

Implements grpc::ServerStreamingInterface.

template<class W , class R >
bool grpc::ServerReaderWriter< W, R >::Write ( const W &  msg,
WriteOptions  options 
)
inlineoverridevirtual

Blocking write msg to the stream with WriteOptions options.

This is thread-safe with respect to Read

Parameters
msgThe message to be written to the stream.
optionsThe WriteOptions affecting the write operation.
Returns
true on success, false when the stream has been closed.

Implements grpc::WriterInterface< W >.


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