aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-08-05 10:44:45 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-08-05 10:44:45 -0700
commita600d58551504f5c0d70760c10b6fcd851ac8de2 (patch)
treecfc0a75f7b8470dd4674330f83ef798e28644ce4 /include
parent99740785f19116879498eca06fc40fc6c144c8ca (diff)
parent183c9f77a7506b4eeebc58ca5a98069d9617eced (diff)
Merge github.com:grpc/grpc into propagate
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 b928f123b5..407f36ad82 100644
--- a/include/grpc/grpc.h
+++ b/include/grpc/grpc.h
@@ -589,7 +589,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);