aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar yang-g <yangg@google.com>2015-07-07 17:47:31 -0700
committerGravatar yang-g <yangg@google.com>2015-07-07 17:47:31 -0700
commit85c04f938f242031cf819f626da21ac597ccd6a6 (patch)
treed351513c484ed6f2df9c7b880ae286f1badf0e99 /include
parente114a017203b1f42257154bf23e764b215176eff (diff)
resolve comments
Diffstat (limited to 'include')
-rw-r--r--include/grpc++/client_context.h3
-rw-r--r--include/grpc++/server_context.h7
2 files changed, 8 insertions, 2 deletions
diff --git a/include/grpc++/client_context.h b/include/grpc++/client_context.h
index 3bf5edc6c0..26bd7c830f 100644
--- a/include/grpc++/client_context.h
+++ b/include/grpc++/client_context.h
@@ -108,7 +108,7 @@ class ClientContext {
creds_ = creds;
}
- std::unique_ptr<const AuthContext> auth_context() const;
+ std::shared_ptr<const AuthContext> auth_context() const;
void TryCancel();
@@ -157,6 +157,7 @@ class ClientContext {
gpr_timespec deadline_;
grpc::string authority_;
std::shared_ptr<Credentials> creds_;
+ mutable std::shared_ptr<const AuthContext> auth_context_;
std::multimap<grpc::string, grpc::string> send_initial_metadata_;
std::multimap<grpc::string, grpc::string> recv_initial_metadata_;
std::multimap<grpc::string, grpc::string> trailing_metadata_;
diff --git a/include/grpc++/server_context.h b/include/grpc++/server_context.h
index 3bf21e02bf..a4ee986df1 100644
--- a/include/grpc++/server_context.h
+++ b/include/grpc++/server_context.h
@@ -99,7 +99,9 @@ class ServerContext {
return client_metadata_;
}
- std::unique_ptr<const AuthContext> auth_context() const;
+ std::shared_ptr<const AuthContext> auth_context() const {
+ return auth_context_;
+ }
private:
friend class ::grpc::Server;
@@ -137,12 +139,15 @@ class ServerContext {
ServerContext(gpr_timespec deadline, grpc_metadata* metadata,
size_t metadata_count);
+ void set_call(grpc_call* call);
+
CompletionOp* completion_op_;
gpr_timespec deadline_;
grpc_call* call_;
CompletionQueue* cq_;
bool sent_initial_metadata_;
+ std::shared_ptr<const AuthContext> auth_context_;
std::multimap<grpc::string, grpc::string> client_metadata_;
std::multimap<grpc::string, grpc::string> initial_metadata_;
std::multimap<grpc::string, grpc::string> trailing_metadata_;