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

Server-side interface for bi-directional streaming. More...

#include <completion_queue.h>

Public Member Functions

 ServerReaderWriter (Call *call, ServerContext *ctx)
 
void SendInitialMetadata ()
 
bool Read (R *msg) GRPC_OVERRIDE
 Blocking read a message and parse to msg. More...
 
bool Write (const W &msg, const WriteOptions &options) GRPC_OVERRIDE
 Blocking write msg to the stream with options. More...
 
- Public Member Functions inherited from grpc::WriterInterface< W >
virtual ~WriterInterface ()
 
bool Write (const W &msg)
 Blocking write msg to the stream with default options. More...
 
- Public Member Functions inherited from grpc::ReaderInterface< R >
virtual ~ReaderInterface ()
 

Detailed Description

template<class R, class W>
class grpc::ServerReaderWriter< R, W >

Server-side interface for bi-directional streaming.

Constructor & Destructor Documentation

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

Member Function Documentation

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

Blocking read a message and parse to msg.

Returns true on success.

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 R, class W>
void grpc::ServerReaderWriter< R, W >::SendInitialMetadata ( )
inline
template<class R, class W>
bool grpc::ServerReaderWriter< R, W >::Write ( const W &  msg,
const WriteOptions options 
)
inlinevirtual

Blocking write msg to the stream with options.

Parameters
msgThe message to be written to the stream.
optionsOptions 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 files: