GRPC C++  1.30.0
Public Member Functions | Friends
grpc_impl::ServerSplitStreamer< RequestType, ResponseType > Class Template Referencefinal

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

#include <sync_stream_impl.h>

Public Member Functions

void SendInitialMetadata () override
 Block to send initial metadata to client. More...
 
bool NextMessageSize (uint32_t *sz) override
 Get an upper bound on the request message size from the client. More...
 
bool Read (RequestType *request) override
 Read a message of type R into msg. More...
 
bool Write (const ResponseType &response, ::grpc::WriteOptions options) override
 Block to write msg to the stream with WriteOptions options. More...
 
- Public Member Functions inherited from grpc_impl::internal::ServerStreamingInterface
virtual ~ServerStreamingInterface ()
 
- Public Member Functions inherited from grpc_impl::internal::WriterInterface< ResponseType >
virtual ~WriterInterface ()
 
bool Write (const ResponseType &msg)
 Block to write msg to the stream with default write options. More...
 
void WriteLast (const ResponseType &msg, ::grpc::WriteOptions options)
 Write msg and coalesce it with the writing of trailing metadata, using WriteOptions options. More...
 
- Public Member Functions inherited from grpc_impl::internal::ReaderInterface< RequestType >
virtual ~ReaderInterface ()
 

Friends

class ::grpc_impl::internal::TemplatedBidiStreamingHandler< ServerSplitStreamer< RequestType, ResponseType >, false >
 

Detailed Description

template<class RequestType, class ResponseType>
class grpc_impl::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.

Member Function Documentation

◆ NextMessageSize()

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

Get an upper bound on the request message size from the client.

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

◆ Read()

template<class RequestType , class ResponseType >
bool grpc_impl::ServerSplitStreamer< RequestType, ResponseType >::Read ( RequestType *  request)
inlineoverridevirtual

Read a message of type R into msg.

Completion will be notified by tag on the associated completion queue. This is thread-safe with respect to Write or WritesDone methods. It should not be called concurrently with other streaming APIs on the same stream. It is not meaningful to call it concurrently with another ReaderInterface::Read on the same stream since reads on the same stream are delivered in order.

Parameters
[out]msgWhere to eventually store the read message.
[in]tagThe tag identifying the operation.

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

◆ SendInitialMetadata()

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

Block to send initial metadata to client.

Implicit input parameter:

  • the ServerContext associated with this call will be used for sending initial metadata.

Implements grpc_impl::internal::ServerStreamingInterface.

◆ Write()

template<class RequestType , class ResponseType >
bool grpc_impl::ServerSplitStreamer< RequestType, ResponseType >::Write ( const ResponseType &  msg,
::grpc::WriteOptions  options 
)
inlineoverridevirtual

Block to write msg to the stream with WriteOptions options.

This is thread-safe with respect to ReaderInterface::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_impl::internal::WriterInterface< ResponseType >.

Friends And Related Function Documentation

◆ ::grpc_impl::internal::TemplatedBidiStreamingHandler< ServerSplitStreamer< RequestType, ResponseType >, false >

template<class RequestType , class ResponseType >
friend class ::grpc_impl::internal::TemplatedBidiStreamingHandler< ServerSplitStreamer< RequestType, ResponseType >, false >
friend

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