GRPC C++
1.66.0
|
An interface that can be fed a sequence of messages of type W. More...
#include <async_stream.h>
Public Member Functions | |
virtual | ~AsyncWriterInterface () |
virtual void | Write (const W &msg, void *tag)=0 |
Request the writing of msg with identifying tag tag. More... | |
virtual void | Write (const W &msg, grpc::WriteOptions options, void *tag)=0 |
Request the writing of msg using WriteOptions options with identifying tag tag. More... | |
void | WriteLast (const W &msg, grpc::WriteOptions options, void *tag) |
Request the writing of msg and coalesce it with the writing of trailing metadata, using WriteOptions options with identifying tag tag. More... | |
An interface that can be fed a sequence of messages of type W.
|
inlinevirtual |
|
pure virtual |
Request the writing of msg using WriteOptions options with identifying tag tag.
Only one write may be outstanding at any given time. This means that after calling Write, one must wait to receive tag from the completion queue BEFORE calling Write again. WriteOptions options is used to set the write options of this message. This is thread-safe with respect to AsyncReaderInterface::Read
gRPC doesn't take ownership or a reference to msg, so it is safe to to deallocate once Write returns.
[in] | msg | The message to be written. |
[in] | options | The WriteOptions to be used to write this message. |
[in] | tag | The tag identifying the operation. |
|
pure virtual |
Request the writing of msg with identifying tag tag.
Only one write may be outstanding at any given time. This means that after calling Write, one must wait to receive tag from the completion queue BEFORE calling Write again. This is thread-safe with respect to AsyncReaderInterface::Read
gRPC doesn't take ownership or a reference to msg, so it is safe to to deallocate once Write returns.
[in] | msg | The message to be written. |
[in] | tag | The tag identifying the operation. |
|
inline |
Request the writing of msg and coalesce it with the writing of trailing metadata, using WriteOptions options with identifying tag tag.
For client, WriteLast is equivalent of performing Write and WritesDone in a single step. For server, WriteLast buffers the msg. The writing of msg is held until Finish is called, where msg and trailing metadata are coalesced and write is initiated. 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.
gRPC doesn't take ownership or a reference to msg, so it is safe to to deallocate once Write returns.
[in] | msg | The message to be written. |
[in] | options | The WriteOptions to be used to write this message. |
[in] | tag | The tag identifying the operation. |