|
|
|
@ -78,6 +78,8 @@ void CallOpBuffer::Reset(void* next_return_tag) { |
|
|
|
|
send_status_ = nullptr; |
|
|
|
|
trailing_metadata_count_ = 0; |
|
|
|
|
trailing_metadata_ = nullptr; |
|
|
|
|
|
|
|
|
|
recv_closed_ = nullptr; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
namespace { |
|
|
|
@ -134,6 +136,10 @@ void CallOpBuffer::AddClientSendClose() { |
|
|
|
|
client_send_close_ = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void CallOpBuffer::AddServerRecvClose(bool* cancelled) { |
|
|
|
|
recv_closed_ = cancelled; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void CallOpBuffer::AddClientRecvStatus( |
|
|
|
|
std::multimap<grpc::string, grpc::string>* metadata, Status *status) { |
|
|
|
|
recv_trailing_metadata_ = metadata; |
|
|
|
@ -205,6 +211,11 @@ void CallOpBuffer::FillOps(grpc_op *ops, size_t *nops) { |
|
|
|
|
send_status_->details().c_str(); |
|
|
|
|
(*nops)++; |
|
|
|
|
} |
|
|
|
|
if (recv_closed_) { |
|
|
|
|
ops[*nops].op = GRPC_OP_RECV_CLOSE_ON_SERVER; |
|
|
|
|
ops[*nops].data.recv_close_on_server.cancelled = &cancelled_buf_; |
|
|
|
|
(*nops)++; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void CallOpBuffer::FinalizeResult(void **tag, bool *status) { |
|
|
|
@ -241,6 +252,9 @@ void CallOpBuffer::FinalizeResult(void **tag, bool *status) { |
|
|
|
|
status_details_ ? grpc::string(status_details_) |
|
|
|
|
: grpc::string()); |
|
|
|
|
} |
|
|
|
|
if (recv_closed_) { |
|
|
|
|
*recv_closed_ = cancelled_buf_ != 0; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Call::Call(grpc_call* call, CallHook *call_hook, CompletionQueue* cq) |
|
|
|
|