template <class W, class R>

class ServerAsyncReaderInterface

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

Public Methods

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

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

and also send out

response to the client.

Request notification for when the server has sent the response and 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:

* 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').

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

or

so it

is safe 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.
msg [in] To be sent to the client as the response for this call.
void FinishWithError (const grpc::Status & status, void * tag)

Indicate that the stream is to be finished with a certain

non-OK 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.

This call is meant to end the call with some error, and can be called at

any point that the server would like to "fail" the call (though note

this shouldn't be called concurrently with any other "sending" call, like

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

metadata (if not sent already), 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 FinishWithError returns.

Parameters

tag [in] Tag identifying this request.
status [in] To be sent to the client as the result of this call. - Note: must have a non-OK code.