diff options
author | Garrett Casto <gcasto@google.com> | 2016-10-17 09:56:43 -0700 |
---|---|---|
committer | Garrett Casto <gcasto@google.com> | 2016-10-17 09:56:43 -0700 |
commit | 7ec31718f45d9ff227752a72bdcde693890676fb (patch) | |
tree | 54bd9b8cbe246f3716ef9aa209ce424fb0010270 /include/grpc++ | |
parent | 37e3cc0c2ae0da0362f4799ada7e3416f1682919 (diff) | |
parent | 062ba7b8baefdc76f74fffb9aa3e2134ba047ea6 (diff) |
Merge remote-tracking branch 'upstream/master' into cronet_cpp_api
Diffstat (limited to 'include/grpc++')
-rw-r--r-- | include/grpc++/impl/codegen/client_context.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/include/grpc++/impl/codegen/client_context.h b/include/grpc++/impl/codegen/client_context.h index 387d807c4b..a330ed06bb 100644 --- a/include/grpc++/impl/codegen/client_context.h +++ b/include/grpc++/impl/codegen/client_context.h @@ -226,8 +226,14 @@ class ClientContext { /// EXPERIMENTAL: Set this request to be cacheable void set_cacheable(bool cacheable) { cacheable_ = cacheable; } - /// EXPERIMENTAL: Trigger fail-fast or not on this request - void set_fail_fast(bool fail_fast) { fail_fast_ = fail_fast; } + /// EXPERIMENTAL: Trigger wait-for-ready or not on this request + void set_wait_for_ready(bool wait_for_ready) { + wait_for_ready_ = wait_for_ready; + wait_for_ready_explicitly_set_ = true; + } + + /// DEPRECATED: Use set_wait_for_ready() instead. + void set_fail_fast(bool fail_fast) { set_wait_for_ready(!fail_fast); } #ifndef GRPC_CXX0X_NO_CHRONO /// Return the deadline for the client call. @@ -347,14 +353,18 @@ class ClientContext { uint32_t initial_metadata_flags() const { return (idempotent_ ? GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST : 0) | - (fail_fast_ ? 0 : GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY) | - (cacheable_ ? GRPC_INITIAL_METADATA_CACHEABLE_REQUEST : 0); + (wait_for_ready_ ? GRPC_INITIAL_METADATA_WAIT_FOR_READY : 0) | + (cacheable_ ? GRPC_INITIAL_METADATA_CACHEABLE_REQUEST : 0) | + (wait_for_ready_explicitly_set_ + ? GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET + : 0); } grpc::string authority() { return authority_; } bool initial_metadata_received_; - bool fail_fast_; + bool wait_for_ready_; + bool wait_for_ready_explicitly_set_; bool idempotent_; bool cacheable_; std::shared_ptr<Channel> channel_; |