diff options
author | Jan Tattermusch <jtattermusch@users.noreply.github.com> | 2016-06-08 19:17:20 -0700 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@users.noreply.github.com> | 2016-06-08 19:17:20 -0700 |
commit | 1bc2976a0f51e14d3525aecbf4b3450445ed2d1b (patch) | |
tree | 62dc4761183d959c135a46bfa83bb1f9ef8994c9 /include/grpc++/impl/codegen | |
parent | b81f1722061052456b6f472d7c72fe4be8901d55 (diff) | |
parent | 37e516e7c99ed08da6b8619701b542e2bd15a732 (diff) |
Merge pull request #6481 from dgquintas/compression_md_level_bis
Allow servers to select compression level via initial MD & overall compression cleanup
Diffstat (limited to 'include/grpc++/impl/codegen')
-rw-r--r-- | include/grpc++/impl/codegen/call.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h index 4f550b42a2..d720f27a8f 100644 --- a/include/grpc++/impl/codegen/call.h +++ b/include/grpc++/impl/codegen/call.h @@ -47,7 +47,9 @@ #include <grpc++/impl/codegen/serialization_traits.h> #include <grpc++/impl/codegen/status.h> #include <grpc++/impl/codegen/string_ref.h> + #include <grpc/impl/codegen/alloc.h> +#include <grpc/impl/codegen/compression_types.h> #include <grpc/impl/codegen/grpc_types.h> struct grpc_byte_buffer; @@ -187,6 +189,8 @@ class CallOpSendInitialMetadata { flags_ = flags; initial_metadata_count_ = metadata.size(); initial_metadata_ = FillMetadataArray(metadata); + // TODO(dgq): expose compression level in API so it can be properly set. + maybe_compression_level_.is_set = false; } protected: @@ -198,6 +202,10 @@ class CallOpSendInitialMetadata { op->reserved = NULL; op->data.send_initial_metadata.count = initial_metadata_count_; op->data.send_initial_metadata.metadata = initial_metadata_; + op->data.send_initial_metadata.maybe_compression_level.is_set = + maybe_compression_level_.is_set; + op->data.send_initial_metadata.maybe_compression_level.level = + maybe_compression_level_.level; } void FinishOp(bool* status, int max_message_size) { if (!send_) return; @@ -209,6 +217,10 @@ class CallOpSendInitialMetadata { uint32_t flags_; size_t initial_metadata_count_; grpc_metadata* initial_metadata_; + struct { + bool is_set; + grpc_compression_level level; + } maybe_compression_level_; }; class CallOpSendMessage { |