diff options
author | Yuxuan Li <yuxuanli@google.com> | 2017-02-08 17:57:24 -0800 |
---|---|---|
committer | Yuxuan Li <yuxuanli@google.com> | 2017-03-08 10:59:31 -0800 |
commit | 34894e4b1c46697a5b484d5f6b7734ea8795d149 (patch) | |
tree | 7ff74c75f5b073a0f883127630c32007d3c156c7 /src/cpp/client | |
parent | d1287b580e9a4dff160d61bb5766c2fd95fe4c79 (diff) |
Implemented stream coalescing design
(RFC:https://github.com/grpc/proposal/pull/3). Add necessary
microbenchmarks to show reduced writes/iter for short streams. Add
necessary end2end test to test out newly added apis. Filter those tests
using *WithCoalescingApi*.
Diffstat (limited to 'src/cpp/client')
-rw-r--r-- | src/cpp/client/client_context.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cpp/client/client_context.cc b/src/cpp/client/client_context.cc index c073741dac..96f97021cb 100644 --- a/src/cpp/client/client_context.cc +++ b/src/cpp/client/client_context.cc @@ -67,7 +67,8 @@ ClientContext::ClientContext() call_canceled_(false), deadline_(gpr_inf_future(GPR_CLOCK_REALTIME)), census_context_(nullptr), - propagate_from_call_(nullptr) { + propagate_from_call_(nullptr), + initial_metadata_corked_(false) { g_client_callbacks->DefaultConstructor(this); } @@ -118,6 +119,10 @@ void ClientContext::set_compression_algorithm( AddMetadata(GRPC_COMPRESSION_REQUEST_ALGORITHM_MD_KEY, algorithm_name); } +void ClientContext::sent_initial_metadata_corked(bool corked) { + initial_metadata_corked_ = corked; +} + void ClientContext::TryCancel() { std::unique_lock<std::mutex> lock(mu_); if (call_) { |