diff options
author | Yang Gao <yangg@google.com> | 2015-03-11 00:10:10 -0700 |
---|---|---|
committer | Yang Gao <yangg@google.com> | 2015-03-11 00:10:10 -0700 |
commit | 0fd94409a0d5cb557b88d8c6038b57fa41d01b8b (patch) | |
tree | 40fc62fd9cb2e59d3e1e257a5c95df6178237653 | |
parent | bc5d466c97ac6de00abf4bea823d736eae8ab899 (diff) |
Expose server cq for polling incoming anonymous rpcs
-rw-r--r-- | include/grpc++/server.h | 2 | ||||
-rw-r--r-- | src/cpp/server/server.cc | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/grpc++/server.h b/include/grpc++/server.h index a580a24632..b808351181 100644 --- a/include/grpc++/server.h +++ b/include/grpc++/server.h @@ -70,6 +70,8 @@ class Server GRPC_FINAL : private CallHook, // function to ever return) void Wait(); + CompletionQueue* cq() { return &cq_; } + private: friend class AnonymousService; friend class ServerBuilder; diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index d8425f1dfc..4328b2c075 100644 --- a/src/cpp/server/server.cc +++ b/src/cpp/server/server.cc @@ -355,10 +355,8 @@ class Server::AsyncRequest GRPC_FINAL : public CompletionQueueTag { array_.metadata[i].value + array_.metadata[i].value_length))); } if (anonymous_ctx_) { - anonymous_ctx_->method_.assign(call_details_.method, - call_details_.method_capacity); - anonymous_ctx_->host_.assign(call_details_.host, - call_details_.host_capacity); + anonymous_ctx_->method_ = call_details_.method; + anonymous_ctx_->host_ = call_details_.host; } } ctx->call_ = call_; |