Async client-side interface for bi-directional streaming, where the outgoing message stream going to the server has messages of type W, and the incoming message stream coming from the server has messages of type R.
More...
#include <async_stream.h>
template<class W, class R>
class grpc::ClientAsyncReaderWriter< W, R >
Async client-side interface for bi-directional streaming, where the outgoing message stream going to the server has messages of type W, and the incoming message stream coming from the server has messages of type R.
◆ Finish()
template<class W , class R >
◆ operator delete() [1/2]
template<class W , class R >
◆ operator delete() [2/2]
template<class W , class R >
◆ Read()
template<class W , class R >
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 AsyncReaderInterface::Read on the same stream since reads on the same stream are delivered in order.
- Parameters
-
[out] | msg | Where to eventually store the read message. |
[in] | tag | The tag identifying the operation. |
Side effect: note that this method attempt to receive initial metadata for a stream if it hasn't yet been received.
Implements grpc::internal::AsyncReaderInterface< R >.
◆ ReadInitialMetadata()
template<class W , class R >
◆ StartCall()
template<class W , class R >
◆ Write() [1/2]
template<class W , class R >
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.
- Parameters
-
[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. |
Implements grpc::internal::AsyncWriterInterface< W >.
◆ Write() [2/2]
template<class W , class R >
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.
- Parameters
-
[in] | msg | The message to be written. |
[in] | tag | The tag identifying the operation. |
Implements grpc::internal::AsyncWriterInterface< W >.
◆ WritesDone()
template<class W , class R >
Signal the client is done with the writes (half-close the client stream).
Thread-safe with respect to AsyncReaderInterface::Read
- Parameters
-
[in] | tag | The tag identifying the operation. |
Implements grpc::ClientAsyncReaderWriterInterface< W, R >.
◆ internal::ClientAsyncReaderWriterFactory< W, R >
template<class W , class R >
The documentation for this class was generated from the following file: