diff options
author | Craig Tiller <ctiller@google.com> | 2016-11-16 15:25:00 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-11-16 15:25:00 -0800 |
commit | c586666cbdfc5b5f2a3306892f8b4491862c5aba (patch) | |
tree | 924f3f760a489ccf7c6c70307b72d1753aedbdf3 /include/grpc++/support | |
parent | 7cdad96fc49090eb5e3a12a7cca5a9f257d3f301 (diff) | |
parent | 1dc9ad33273e090a1c7ffa05991dc8ccc2badee6 (diff) |
Merge github.com:grpc/grpc into slice_with_exec_ctx
Diffstat (limited to 'include/grpc++/support')
-rw-r--r-- | include/grpc++/support/channel_arguments.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/grpc++/support/channel_arguments.h b/include/grpc++/support/channel_arguments.h index 49a3e9461c..220b6ef1dd 100644 --- a/include/grpc++/support/channel_arguments.h +++ b/include/grpc++/support/channel_arguments.h @@ -79,6 +79,9 @@ class ChannelArguments { /// Set the compression algorithm for the channel. void SetCompressionAlgorithm(grpc_compression_algorithm algorithm); + /// Set the socket mutator for the channel. + void SetSocketMutator(grpc_socket_mutator* mutator); + /// The given string will be sent at the front of the user agent string. void SetUserAgentPrefix(const grpc::string& user_agent_prefix); @@ -104,6 +107,15 @@ class ChannelArguments { /// Set a textual argument \a value under \a key. void SetString(const grpc::string& key, const grpc::string& value); + /// Return (by value) a c grpc_channel_args structure which points to + /// arguments owned by this ChannelArguments instance + grpc_channel_args c_channel_args() { + grpc_channel_args out; + out.num_args = args_.size(); + out.args = args_.empty() ? NULL : &args_[0]; + return out; + } + private: friend class SecureChannelCredentials; friend class testing::ChannelArgumentsTest; @@ -111,7 +123,7 @@ class ChannelArguments { /// Default pointer argument operations. struct PointerVtableMembers { static void* Copy(void* in) { return in; } - static void Destroy(void* in) {} + static void Destroy(grpc_exec_ctx* exec_ctx, void* in) {} static int Compare(void* a, void* b) { if (a < b) return -1; if (a > b) return 1; |