An interface that yields a sequence of messages of type R. More...
#include <async_stream.h>
Public Member Functions | |
virtual void | Read (R *msg, void *tag)=0 |
virtual | ~AsyncReaderInterface () |
An interface that yields a sequence of messages of type R.
Definition at line 83 of file grpcpp/impl/codegen/async_stream.h.
|
inlinevirtual |
Definition at line 85 of file grpcpp/impl/codegen/async_stream.h.
|
pure virtual |
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.
[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.
Implemented in grpc::ServerAsyncReaderWriter< ResponseType, RequestType >, grpc::ServerAsyncReader< ResponseType, RequestType >, grpc::ServerAsyncReaderWriter< W, R >, grpc::ServerAsyncReader< W, R >, grpc::ClientAsyncReaderWriter< W, R >, grpc::ClientAsyncReader< R >, and grpc::ServerAsyncReaderWriter< grpc::lb::v1::LoadReportResponse, grpc::lb::v1::LoadReportRequest >.