|
|
@ -334,6 +334,10 @@ class ServerAsyncResponseWriter final |
|
|
|
/// Note: if \a status has a non-OK code, then \a msg will not be sent,
|
|
|
|
/// Note: if \a status has a non-OK code, then \a msg will not be sent,
|
|
|
|
/// and the client will receive only the status with possible trailing
|
|
|
|
/// and the client will receive only the status with possible trailing
|
|
|
|
/// metadata.
|
|
|
|
/// metadata.
|
|
|
|
|
|
|
|
///
|
|
|
|
|
|
|
|
/// gRPC doesn't take ownership or a reference to msg and status, so it is
|
|
|
|
|
|
|
|
/// safe to deallocate them once the Finish operation is complete (i.e. a
|
|
|
|
|
|
|
|
/// result arrives in the completion queue).
|
|
|
|
void Finish(const W& msg, const ::grpc::Status& status, void* tag) { |
|
|
|
void Finish(const W& msg, const ::grpc::Status& status, void* tag) { |
|
|
|
finish_buf_.set_output_tag(tag); |
|
|
|
finish_buf_.set_output_tag(tag); |
|
|
|
finish_buf_.set_core_cq_tag(&finish_buf_); |
|
|
|
finish_buf_.set_core_cq_tag(&finish_buf_); |
|
|
@ -367,6 +371,10 @@ class ServerAsyncResponseWriter final |
|
|
|
/// Side effect:
|
|
|
|
/// Side effect:
|
|
|
|
/// - also sends initial metadata if not already sent (using the
|
|
|
|
/// - also sends initial metadata if not already sent (using the
|
|
|
|
/// \a ServerContext associated with this call).
|
|
|
|
/// \a ServerContext associated with this call).
|
|
|
|
|
|
|
|
///
|
|
|
|
|
|
|
|
/// gRPC doesn't take ownership or a reference to status, so it is safe to
|
|
|
|
|
|
|
|
/// deallocate them once the Finish operation is complete (i.e. a result
|
|
|
|
|
|
|
|
/// arrives in the completion queue).
|
|
|
|
void FinishWithError(const ::grpc::Status& status, void* tag) { |
|
|
|
void FinishWithError(const ::grpc::Status& status, void* tag) { |
|
|
|
GPR_CODEGEN_ASSERT(!status.ok()); |
|
|
|
GPR_CODEGEN_ASSERT(!status.ok()); |
|
|
|
finish_buf_.set_output_tag(tag); |
|
|
|
finish_buf_.set_output_tag(tag); |
|
|
|