GRPC C++
1.30.0
|
Async server-side API for doing bidirectional streaming RPCs, where the incoming message stream coming from the client has messages of type R, and the outgoing message stream coming from the server has messages of type W. More...
#include <async_stream_impl.h>
Public Member Functions | |
ServerAsyncReaderWriter (::grpc_impl::ServerContext *ctx) | |
void | SendInitialMetadata (void *tag) override |
See ServerAsyncStreamingInterface::SendInitialMetadata for semantics. More... | |
void | Read (R *msg, void *tag) override |
Read a message of type R into msg. More... | |
void | Write (const W &msg, void *tag) override |
Request the writing of msg with identifying tag tag. More... | |
void | Write (const W &msg, ::grpc::WriteOptions options, void *tag) override |
Request the writing of msg using WriteOptions options with identifying tag tag. More... | |
void | WriteAndFinish (const W &msg, ::grpc::WriteOptions options, const ::grpc::Status &status, void *tag) override |
See the ServerAsyncReaderWriterInterface.WriteAndFinish method for semantics. More... | |
void | Finish (const ::grpc::Status &status, void *tag) override |
See the ServerAsyncReaderWriterInterface.Finish method for semantics. More... | |
Public Member Functions inherited from grpc::internal::ServerAsyncStreamingInterface | |
virtual | ~ServerAsyncStreamingInterface () |
Public Member Functions inherited from grpc_impl::internal::AsyncWriterInterface< W > | |
virtual | ~AsyncWriterInterface () |
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... | |
Public Member Functions inherited from grpc_impl::internal::AsyncReaderInterface< R > | |
virtual | ~AsyncReaderInterface () |
Friends | |
class | ::grpc_impl::Server |
Async server-side API for doing bidirectional streaming RPCs, where the incoming message stream coming from the client has messages of type R, and the outgoing message stream coming from the server has messages of type W.
|
inlineexplicit |
|
inlineoverridevirtual |
See the ServerAsyncReaderWriterInterface.Finish method for semantics.
Implicit input parameter:
Note: there are no restrictions are the code of status, it may be non-OK gRPC doesn't take ownership or a reference to status, so it is safe to to deallocate once Finish returns.
Implements grpc_impl::ServerAsyncReaderWriterInterface< W, R >.
|
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 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.
Implements grpc_impl::internal::AsyncReaderInterface< R >.
|
inlineoverridevirtual |
See ServerAsyncStreamingInterface::SendInitialMetadata for semantics.
Implicit input parameter:
[in] | tag | Tag identifying this request. |
Implements grpc::internal::ServerAsyncStreamingInterface.
|
inlineoverridevirtual |
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. |
Implements grpc_impl::internal::AsyncWriterInterface< W >.
|
inlineoverridevirtual |
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. |
Implements grpc_impl::internal::AsyncWriterInterface< W >.
|
inlineoverridevirtual |
See the ServerAsyncReaderWriterInterface.WriteAndFinish method for semantics.
Implicit input parameter:
Note: status must have an OK code. gRPC doesn't take ownership or a reference to msg and status, so it is safe to deallocate once WriteAndFinish returns.
Implements grpc_impl::ServerAsyncReaderWriterInterface< W, R >.
|
friend |