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

A class to represent a flow-controlled server-side streaming call. More...

#include <sync_stream.h>

Public Member Functions

 ServerSplitStreamer (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 (RequestType *request) override
 Blocking read a message and parse to msg. More...
 
bool Write (const ResponseType &response, 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< ResponseType >
virtual ~WriterInterface ()
 
bool Write (const ResponseType &msg)
 Blocking write msg to the stream with default write options. More...
 
void WriteLast (const ResponseType &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< RequestType >
virtual ~ReaderInterface ()
 

Detailed Description

template<class RequestType, class ResponseType>
class grpc::ServerSplitStreamer< RequestType, ResponseType >

A class to represent a flow-controlled server-side streaming call.

This is something of a hybrid between server-side and bidi streaming. This is invoked through a server-side streaming call on the client side, but the server responds to it as though it were a bidi streaming call that must first have exactly 1 Read and then any number of Writes.

Constructor & Destructor Documentation

template<class RequestType , class ResponseType >
grpc::ServerSplitStreamer< RequestType, ResponseType >::ServerSplitStreamer ( Call call,
ServerContext ctx 
)
inline

Member Function Documentation

template<class RequestType , class ResponseType >
bool grpc::ServerSplitStreamer< RequestType, ResponseType >::NextMessageSize ( uint32_t *  sz)
inlineoverridevirtual

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

Implements grpc::ReaderInterface< RequestType >.

template<class RequestType , class ResponseType >
bool grpc::ServerSplitStreamer< RequestType, ResponseType >::Read ( RequestType *  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< RequestType >.

template<class RequestType , class ResponseType >
void grpc::ServerSplitStreamer< RequestType, ResponseType >::SendInitialMetadata ( )
inlineoverridevirtual

Blocking send initial metadata to client.

Implements grpc::ServerStreamingInterface.

template<class RequestType , class ResponseType >
bool grpc::ServerSplitStreamer< RequestType, ResponseType >::Write ( const ResponseType &  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< ResponseType >.


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