aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Sree Kuchibhotla <sreek@google.com>2016-06-23 15:54:19 -0700
committerGravatar Sree Kuchibhotla <sreek@google.com>2016-06-23 15:54:19 -0700
commit13b2b7f5eaf785a694e35716fa92cabb26656310 (patch)
treeebc41174ee22bb88d164b48cb44f2ee2397146e4 /include
parent6a29545c8c5ef61346af3a9b0bdd2ddb39ba15c8 (diff)
parent894eac559f6f02ec8853d00f74d1c9474646d3ab (diff)
Merge branch 'master' into epoll_changes
Diffstat (limited to 'include')
-rw-r--r--include/grpc++/impl/codegen/client_context.h10
-rw-r--r--include/grpc++/impl/codegen/server_context.h7
2 files changed, 9 insertions, 8 deletions
diff --git a/include/grpc++/impl/codegen/client_context.h b/include/grpc++/impl/codegen/client_context.h
index e23fd4eda3..a132c9a57a 100644
--- a/include/grpc++/impl/codegen/client_context.h
+++ b/include/grpc++/impl/codegen/client_context.h
@@ -193,7 +193,7 @@ class ClientContext {
///
/// \return A multimap of initial metadata key-value pairs from the server.
const std::multimap<grpc::string_ref, grpc::string_ref>&
- GetServerInitialMetadata() {
+ GetServerInitialMetadata() const {
GPR_CODEGEN_ASSERT(initial_metadata_received_);
return recv_initial_metadata_;
}
@@ -205,7 +205,7 @@ class ClientContext {
///
/// \return A multimap of metadata trailing key-value pairs from the server.
const std::multimap<grpc::string_ref, grpc::string_ref>&
- GetServerTrailingMetadata() {
+ GetServerTrailingMetadata() const {
// TODO(yangg) check finished
return trailing_metadata_;
}
@@ -230,13 +230,13 @@ class ClientContext {
#ifndef GRPC_CXX0X_NO_CHRONO
/// Return the deadline for the client call.
- std::chrono::system_clock::time_point deadline() {
+ std::chrono::system_clock::time_point deadline() const {
return Timespec2Timepoint(deadline_);
}
#endif // !GRPC_CXX0X_NO_CHRONO
/// Return a \a gpr_timespec representation of the client call's deadline.
- gpr_timespec raw_deadline() { return deadline_; }
+ gpr_timespec raw_deadline() const { return deadline_; }
/// Set the per call authority header (see
/// https://tools.ietf.org/html/rfc7540#section-8.1.2.3).
@@ -337,7 +337,7 @@ class ClientContext {
const InputMessage& request,
OutputMessage* result);
- grpc_call* call() { return call_; }
+ grpc_call* call() const { return call_; }
void set_call(grpc_call* call, const std::shared_ptr<Channel>& channel);
uint32_t initial_metadata_flags() const {
diff --git a/include/grpc++/impl/codegen/server_context.h b/include/grpc++/impl/codegen/server_context.h
index a1e1ed176f..cea13a513f 100644
--- a/include/grpc++/impl/codegen/server_context.h
+++ b/include/grpc++/impl/codegen/server_context.h
@@ -94,12 +94,12 @@ class ServerContext {
~ServerContext();
#ifndef GRPC_CXX0X_NO_CHRONO
- std::chrono::system_clock::time_point deadline() {
+ std::chrono::system_clock::time_point deadline() const {
return Timespec2Timepoint(deadline_);
}
#endif // !GRPC_CXX0X_NO_CHRONO
- gpr_timespec raw_deadline() { return deadline_; }
+ gpr_timespec raw_deadline() const { return deadline_; }
void AddInitialMetadata(const grpc::string& key, const grpc::string& value);
void AddTrailingMetadata(const grpc::string& key, const grpc::string& value);
@@ -122,7 +122,8 @@ class ServerContext {
// was called.
void TryCancel() const;
- const std::multimap<grpc::string_ref, grpc::string_ref>& client_metadata() {
+ const std::multimap<grpc::string_ref, grpc::string_ref>& client_metadata()
+ const {
return client_metadata_;
}