diff options
author | Craig Tiller <ctiller@google.com> | 2016-11-16 14:56:34 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-11-16 14:56:34 -0800 |
commit | 1016d9feca27f295fb8fe1c0e76a9fbd0ef14051 (patch) | |
tree | 5f9ce273109af25c2e8585118bd2b77fd2bd1227 /include/grpc++/support | |
parent | 13fda37dee1b1de6dda079b3a019e138352ee176 (diff) | |
parent | 740665a6f65b3d827e0755de8bb1bcd57745b9f1 (diff) |
Merge github.com:grpc/grpc into bm_fullstack
Diffstat (limited to 'include/grpc++/support')
-rw-r--r-- | include/grpc++/support/channel_arguments.h | 3 | ||||
-rw-r--r-- | include/grpc++/support/slice.h | 20 |
2 files changed, 13 insertions, 10 deletions
diff --git a/include/grpc++/support/channel_arguments.h b/include/grpc++/support/channel_arguments.h index bbfb056b79..5879f40447 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); diff --git a/include/grpc++/support/slice.h b/include/grpc++/support/slice.h index 85561f7f33..3ec0d1af80 100644 --- a/include/grpc++/support/slice.h +++ b/include/grpc++/support/slice.h @@ -35,11 +35,11 @@ #define GRPCXX_SUPPORT_SLICE_H #include <grpc++/support/config.h> -#include <grpc/support/slice.h> +#include <grpc/slice.h> namespace grpc { -/// A wrapper around \a gpr_slice. +/// A wrapper around \a grpc_slice. /// /// A slice represents a contiguous reference counted array of bytes. /// It is cheap to take references to a slice, and it is cheap to create a @@ -53,11 +53,11 @@ class Slice final { enum AddRef { ADD_REF }; /// Construct a slice from \a slice, adding a reference. - Slice(gpr_slice slice, AddRef); + Slice(grpc_slice slice, AddRef); enum StealRef { STEAL_REF }; /// Construct a slice from \a slice, stealing a reference. - Slice(gpr_slice slice, StealRef); + Slice(grpc_slice slice, StealRef); /// Copy constructor, adds a reference. Slice(const Slice& other); @@ -69,21 +69,21 @@ class Slice final { } /// Byte size. - size_t size() const { return GPR_SLICE_LENGTH(slice_); } + size_t size() const { return GRPC_SLICE_LENGTH(slice_); } /// Raw pointer to the beginning (first element) of the slice. - const uint8_t* begin() const { return GPR_SLICE_START_PTR(slice_); } + const uint8_t* begin() const { return GRPC_SLICE_START_PTR(slice_); } /// Raw pointer to the end (one byte \em past the last element) of the slice. - const uint8_t* end() const { return GPR_SLICE_END_PTR(slice_); } + const uint8_t* end() const { return GRPC_SLICE_END_PTR(slice_); } - /// Raw C slice. Caller needs to call gpr_slice_unref when done. - gpr_slice c_slice() const { return gpr_slice_ref(slice_); } + /// Raw C slice. Caller needs to call grpc_slice_unref when done. + grpc_slice c_slice() const { return grpc_slice_ref(slice_); } private: friend class ByteBuffer; - gpr_slice slice_; + grpc_slice slice_; }; } // namespace grpc |