diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-02-09 17:15:03 -0800 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-02-09 17:15:03 -0800 |
commit | de917062ecacbeb547c8e2e4e3f4260d3e9a2f2e (patch) | |
tree | 20befa87421de79a47afc542554549400e0bd8e6 /include/grpc++/call.h | |
parent | 7630205bdfe2b7871e810f8ea7eab388d02240bf (diff) |
Refine completion queue
Diffstat (limited to 'include/grpc++/call.h')
-rw-r--r-- | include/grpc++/call.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/grpc++/call.h b/include/grpc++/call.h index 5aa96d33b9..94215bfa98 100644 --- a/include/grpc++/call.h +++ b/include/grpc++/call.h @@ -55,6 +55,8 @@ class ChannelInterface; class CallOpBuffer final : public CompletionQueueTag { public: + CallOpBuffer() : return_tag_(this) {} + void AddSendInitialMetadata(std::vector<std::pair<grpc::string, grpc::string> > *metadata); void AddSendMessage(const google::protobuf::Message &message); void AddRecvMessage(google::protobuf::Message *message); @@ -67,7 +69,10 @@ class CallOpBuffer final : public CompletionQueueTag { void FillOps(grpc_op *ops, size_t *nops); // Called by completion queue just prior to returning from Next() or Pluck() - FinalizeResultOutput FinalizeResult(bool status) override; + void FinalizeResult(void *tag, bool *status) override; + + private: + void *return_tag_; }; class CCallDeleter { @@ -80,7 +85,7 @@ class Call final { public: Call(grpc_call *call, ChannelInterface *channel, CompletionQueue *cq); - void PerformOps(CallOpBuffer *buffer, void *tag); + void PerformOps(CallOpBuffer *buffer); grpc_call *call() { return call_.get(); } CompletionQueue *cq() { return cq_; } |