diff options
author | Craig Tiller <ctiller@google.com> | 2016-09-08 09:54:03 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-09-08 09:54:03 -0700 |
commit | 8f416dbb9793473d32020a108133235ec147e5df (patch) | |
tree | 483d18906ca7bb03460edeaddf5fa334707d080e /include | |
parent | c1c691fdb1545f601afe843c5820a45a630d25fc (diff) | |
parent | 93b09478f0264f62e577b215dea7bc908abc6b98 (diff) |
Merge github.com:grpc/grpc into grand-unified-closures
Diffstat (limited to 'include')
-rw-r--r-- | include/grpc++/impl/codegen/client_context.h | 7 | ||||
-rw-r--r-- | include/grpc/impl/codegen/grpc_types.h | 5 |
2 files changed, 11 insertions, 1 deletions
diff --git a/include/grpc++/impl/codegen/client_context.h b/include/grpc++/impl/codegen/client_context.h index d77ca4c396..9fecb5043e 100644 --- a/include/grpc++/impl/codegen/client_context.h +++ b/include/grpc++/impl/codegen/client_context.h @@ -225,6 +225,9 @@ class ClientContext { /// EXPERIMENTAL: Set this request to be idempotent void set_idempotent(bool idempotent) { idempotent_ = idempotent; } + /// 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; } @@ -346,7 +349,8 @@ class ClientContext { uint32_t initial_metadata_flags() const { return (idempotent_ ? GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST : 0) | - (fail_fast_ ? 0 : GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY); + (fail_fast_ ? 0 : GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY) | + (cacheable_ ? GRPC_INITIAL_METADATA_CACHEABLE_REQUEST : 0); } grpc::string authority() { return authority_; } @@ -354,6 +358,7 @@ class ClientContext { bool initial_metadata_received_; bool fail_fast_; bool idempotent_; + bool cacheable_; std::shared_ptr<Channel> channel_; grpc::mutex mu_; grpc_call* call_; diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index b3372d7c31..e333b42ad6 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -142,6 +142,11 @@ typedef struct { /** How much memory to use for hpack encoding. Int valued, bytes. */ #define GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER \ "grpc.http2.hpack_table_size.encoder" +/** How big a frame are we willing to receive via HTTP2. + Min 16384, max 16777215. + Larger values give lower CPU usage for large messages, but more head of line + blocking for small messages. */ +#define GRPC_ARG_HTTP2_MAX_FRAME_SIZE "grpc.http2.max_frame_size" /** Default authority to pass if none specified on call construction. A string. * */ #define GRPC_ARG_DEFAULT_AUTHORITY "grpc.default_authority" |