aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Hongwei Wang <hongweiw@google.com>2015-08-05 11:21:15 -0700
committerGravatar Hongwei Wang <hongweiw@google.com>2015-08-05 11:21:15 -0700
commit4346e53be633898d60c0bea2d674de11cf69a8e3 (patch)
treeb6aa06e4dc4488945a5f1299985ef9f3ac9e053e /include
parent00e9c60c87d3d9351759551ce662c1b9572f7ced (diff)
parent183c9f77a7506b4eeebc58ca5a98069d9617eced (diff)
Merge branch 'master' of https://github.com/grpc/grpc into zookeeper
Diffstat (limited to 'include')
-rw-r--r--include/grpc++/server_context.h10
-rw-r--r--include/grpc/grpc.h2
2 files changed, 11 insertions, 1 deletions
diff --git a/include/grpc++/server_context.h b/include/grpc++/server_context.h
index cf2732b33d..23273f43e6 100644
--- a/include/grpc++/server_context.h
+++ b/include/grpc++/server_context.h
@@ -125,6 +125,14 @@ class ServerContext {
const struct census_context* census_context() const;
+ // Async only. Has to be called before the rpc starts.
+ // Returns the tag in completion queue when the rpc finishes.
+ // IsCancelled() can then be called to check whether the rpc was cancelled.
+ void AsyncNotifyWhenDone(void* tag) {
+ has_notify_when_done_tag_ = true;
+ async_notify_when_done_tag_ = tag;
+ }
+
private:
friend class ::grpc::testing::InteropContextInspector;
friend class ::grpc::Server;
@@ -165,6 +173,8 @@ class ServerContext {
void set_call(grpc_call* call);
CompletionOp* completion_op_;
+ bool has_notify_when_done_tag_;
+ void* async_notify_when_done_tag_;
gpr_timespec deadline_;
grpc_call* call_;
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h
index 282fe53075..b4fc9ce92a 100644
--- a/include/grpc/grpc.h
+++ b/include/grpc/grpc.h
@@ -568,7 +568,7 @@ void grpc_server_register_completion_queue(grpc_server *server,
/** Add a HTTP2 over plaintext over tcp listener.
Returns bound port number on success, 0 on failure.
REQUIRES: server not started */
-int grpc_server_add_http2_port(grpc_server *server, const char *addr);
+int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr);
/** Start a server - tells all listeners to start listening */
void grpc_server_start(grpc_server *server);