Merge pull request #576 from vjpai/mac
Mac-specific Makefile inclusions and installation instructions
diff --git a/Makefile b/Makefile
index 97a00e0..92def36 100644
--- a/Makefile
+++ b/Makefile
@@ -3027,7 +3027,6 @@
include/grpc++/server_credentials.h \
include/grpc++/status.h \
include/grpc++/stream.h \
- include/grpc++/stream_context_interface.h \
LIBGRPC++_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_SRC))))
diff --git a/build.json b/build.json
index 07af691..4bca52e 100644
--- a/build.json
+++ b/build.json
@@ -415,8 +415,7 @@
"include/grpc++/server_context.h",
"include/grpc++/server_credentials.h",
"include/grpc++/status.h",
- "include/grpc++/stream.h",
- "include/grpc++/stream_context_interface.h"
+ "include/grpc++/stream.h"
],
"headers": [
"src/cpp/client/channel.h",
diff --git a/include/grpc++/client_context.h b/include/grpc++/client_context.h
index 24e67c9..52bedd4 100644
--- a/include/grpc++/client_context.h
+++ b/include/grpc++/client_context.h
@@ -81,12 +81,12 @@
void AddMetadata(const grpc::string &meta_key,
const grpc::string &meta_value);
- std::multimap<grpc::string, grpc::string> GetServerInitialMetadata() {
+ const std::multimap<grpc::string, grpc::string>& GetServerInitialMetadata() {
GPR_ASSERT(initial_metadata_received_);
return recv_initial_metadata_;
}
- std::multimap<grpc::string, grpc::string> GetServerTrailingMetadata() {
+ const std::multimap<grpc::string, grpc::string>& GetServerTrailingMetadata() {
// TODO(yangg) check finished
return trailing_metadata_;
}
diff --git a/include/grpc++/server_context.h b/include/grpc++/server_context.h
index 06744f8..520278f 100644
--- a/include/grpc++/server_context.h
+++ b/include/grpc++/server_context.h
@@ -76,7 +76,7 @@
void AddInitialMetadata(const grpc::string& key, const grpc::string& value);
void AddTrailingMetadata(const grpc::string& key, const grpc::string& value);
- std::multimap<grpc::string, grpc::string> client_metadata() {
+ const std::multimap<grpc::string, grpc::string>& client_metadata() {
return client_metadata_;
}
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h
index b33cc3d..4a720d1 100644
--- a/include/grpc/grpc.h
+++ b/include/grpc/grpc.h
@@ -354,10 +354,18 @@
} data;
} grpc_op;
-/* Initialize the grpc library */
+/* Initialize the grpc library.
+ It is not safe to call any other grpc functions before calling this.
+ (To avoid overhead, little checking is done, and some things may work. We
+ do not warrant that they will continue to do so in future revisions of this
+ library). */
void grpc_init(void);
-/* Shut down the grpc library */
+/* Shut down the grpc library.
+ No memory is used by grpc after this call returns, nor are any instructions
+ executing within the grpc library.
+ Prior to calling, all application owned grpc objects must have been
+ destroyed. */
void grpc_shutdown(void);
grpc_completion_queue *grpc_completion_queue_create(void);
@@ -386,7 +394,12 @@
void grpc_event_finish(grpc_event *event);
/* Begin destruction of a completion queue. Once all possible events are
- drained it's safe to call grpc_completion_queue_destroy. */
+ drained then grpc_completion_queue_next will start to produce
+ GRPC_QUEUE_SHUTDOWN events only. At that point it's safe to call
+ grpc_completion_queue_destroy.
+
+ After calling this function applications should ensure that no
+ NEW work is added to be published on this completion queue. */
void grpc_completion_queue_shutdown(grpc_completion_queue *cq);
/* Destroy a completion queue. The caller must ensure that the queue is