Expose server cq for polling incoming anonymous rpcs

pull/1003/head
Yang Gao 10 years ago
parent bc5d466c97
commit 0fd94409a0
  1. 2
      include/grpc++/server.h
  2. 6
      src/cpp/server/server.cc

@ -70,6 +70,8 @@ class Server GRPC_FINAL : private CallHook,
// function to ever return) // function to ever return)
void Wait(); void Wait();
CompletionQueue* cq() { return &cq_; }
private: private:
friend class AnonymousService; friend class AnonymousService;
friend class ServerBuilder; friend class ServerBuilder;

@ -355,10 +355,8 @@ class Server::AsyncRequest GRPC_FINAL : public CompletionQueueTag {
array_.metadata[i].value + array_.metadata[i].value_length))); array_.metadata[i].value + array_.metadata[i].value_length)));
} }
if (anonymous_ctx_) { if (anonymous_ctx_) {
anonymous_ctx_->method_.assign(call_details_.method, anonymous_ctx_->method_ = call_details_.method;
call_details_.method_capacity); anonymous_ctx_->host_ = call_details_.host;
anonymous_ctx_->host_.assign(call_details_.host,
call_details_.host_capacity);
} }
} }
ctx->call_ = call_; ctx->call_ = call_;

Loading…
Cancel
Save