GRPC C++
1.66.0
|
An interface that can be fed a sequence of messages of type W. More...
#include <sync_stream.h>
Public Member Functions | |
virtual | ~WriterInterface () |
virtual bool | Write (const W &msg, grpc::WriteOptions options)=0 |
Block to write msg to the stream with WriteOptions options. More... | |
bool | Write (const W &msg) |
Block to write msg to the stream with default write options. More... | |
void | WriteLast (const W &msg, grpc::WriteOptions options) |
Write msg and coalesce it with the writing of trailing metadata, using WriteOptions options. More... | |
An interface that can be fed a sequence of messages of type W.
|
inlinevirtual |
|
inline |
Block to write msg to the stream with default write options.
This is thread-safe with respect to ReaderInterface::Read
msg | The message to be written to the stream. |
|
pure virtual |
Block to write msg to the stream with WriteOptions options.
This is thread-safe with respect to ReaderInterface::Read
msg | The message to be written to the stream. |
options | The WriteOptions affecting the write operation. |
Implemented in grpc::ServerReaderWriter< W, R >, grpc::ServerSplitStreamer< RequestType, ResponseType >, and grpc::ServerUnaryStreamer< RequestType, ResponseType >.
|
inline |
Write msg and coalesce it with the writing of trailing metadata, using WriteOptions options.
For client, WriteLast is equivalent of performing Write and WritesDone in a single step. msg and trailing metadata are coalesced and sent on wire by calling this function. For server, WriteLast buffers the msg. The writing of msg is held until the service handler returns, where msg and trailing metadata are coalesced and sent on wire. Note that WriteLast can only buffer msg up to the flow control window size. If msg size is larger than the window size, it will be sent on wire without buffering.
[in] | msg | The message to be written to the stream. |
[in] | options | The WriteOptions to be used to write this message. |