template <class W, class R>

class ServerAsyncReaderWriterInterface

Defined at line 960 of file ../../third_party/grpc-migrating/src/include/grpcpp/support/async_stream.h

Server-side interface for asynchronous bi-directional streaming.

Public Methods

void Finish (const grpc::Status & status, void * tag)

Indicate that the stream is to be finished with a certain status code.

Request notification for when the server has sent the appropriate

signals to the client to end the call.

Should not be used concurrently with other operations.

It is appropriate to call this method when either:

* all messages from the client have been received (either known

implicitly, or explicitly because a previous

operation

with a non-ok result (e.g., cq->Next(

&read

_tag,

&ok

) filled in 'ok'

with 'false'.

* it is desired to end the call early with some non-OK status code.

This operation will end when the server has finished sending out initial

metadata (if not sent already), response message, and status, or if some

failure occurred when trying to do so.

gRPC doesn't take ownership or a reference to

so it is safe to

to deallocate once Finish returns.

Parameters

tag [in] Tag identifying this request.
status [in] To be sent to the client as the result of this call.
void WriteAndFinish (const W & msg, grpc::WriteOptions options, const grpc::Status & status, void * tag)

Request the writing of

and coalesce it with trailing metadata which

contains

using WriteOptions options with

identifying tag

WriteAndFinish is equivalent of performing WriteLast and Finish in a

single step.

gRPC doesn't take ownership or a reference to

and

so it

is safe to deallocate once WriteAndFinish returns.

Parameters

msg [in] The message to be written.
options [in] The WriteOptions to be used to write this message.
status [in] The Status that server returns to client.
tag [in] The tag identifying the operation.