diff options
author | yangg <yangg@google.com> | 2014-12-11 15:57:37 -0800 |
---|---|---|
committer | Nicolas Noble <nnoble@google.com> | 2014-12-12 16:08:10 -0800 |
commit | 87da1b937dc478a1562c1e0ed6c80256e7ee2c53 (patch) | |
tree | 5d76f8841133d4ae5c9a10e95b9bcd6569ed443e /include | |
parent | 33a2168453a65e032f9582b3166e369d3f826c67 (diff) |
Make the default deadline gpr_inf_future to avoid mismatch between
gpr_inf_future and time_point::max(). The redundant AbsoluteDeadline prefix is removed from the utility function names.
Now the ClientContext holds a gpr_timespec instead of a time_point.
A test will be added in the server side deadline support cl.
Change on 2014/12/11 by yangg <yangg@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81920769
Diffstat (limited to 'include')
-rw-r--r-- | include/grpc++/client_context.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/grpc++/client_context.h b/include/grpc++/client_context.h index ec1a4c2782..0cf6bdc647 100644 --- a/include/grpc++/client_context.h +++ b/include/grpc++/client_context.h @@ -38,8 +38,9 @@ #include <string> #include <vector> -#include <grpc++/config.h> #include <grpc/support/log.h> +#include <grpc/support/time.h> +#include <grpc++/config.h> using std::chrono::system_clock; @@ -78,9 +79,11 @@ class ClientContext { grpc_completion_queue *cq() { return cq_; } void set_cq(grpc_completion_queue *cq) { cq_ = cq; } + gpr_timespec RawDeadline() { return absolute_deadline_; } + grpc_call *call_; grpc_completion_queue *cq_; - system_clock::time_point absolute_deadline_; + gpr_timespec absolute_deadline_; std::vector<std::pair<grpc::string, grpc::string> > metadata_; }; |