diff options
author | Craig Tiller <ctiller@google.com> | 2015-09-11 12:59:27 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-09-11 12:59:27 -0700 |
commit | f29a38820735c332f1d16c5ae4b91e332a0ca5cc (patch) | |
tree | db7f766b68b1163d53eec67b7cb7984c89f3114e /include | |
parent | 6b8046375e15702493094598803c22ed3b8e1e65 (diff) | |
parent | 855dbf189bde7374f9c211b3f7adc3ba139db6a4 (diff) |
Merge github.com:grpc/grpc into immolating-conversion
Diffstat (limited to 'include')
-rw-r--r-- | include/grpc++/server.h | 3 | ||||
-rw-r--r-- | include/grpc++/server_builder.h | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/include/grpc++/server.h b/include/grpc++/server.h index 18a8017880..210fe020ad 100644 --- a/include/grpc++/server.h +++ b/include/grpc++/server.h @@ -37,6 +37,7 @@ #include <list> #include <memory> +#include <grpc/compression.h> #include <grpc++/completion_queue.h> #include <grpc++/impl/call.h> #include <grpc++/impl/grpc_library.h> @@ -99,7 +100,7 @@ class Server GRPC_FINAL : public GrpcLibrary, private CallHook { /// \param max_message_size Maximum message length that the channel can /// receive. Server(ThreadPoolInterface* thread_pool, bool thread_pool_owned, - int max_message_size); + int max_message_size, grpc_compression_options compression_options); /// Register a service. This call does not take ownership of the service. /// The service must exist for the lifetime of the Server instance. diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index 496e7862c5..05937f150b 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -37,6 +37,7 @@ #include <memory> #include <vector> +#include <grpc/compression.h> #include <grpc++/support/config.h> namespace grpc { @@ -92,6 +93,11 @@ class ServerBuilder { max_message_size_ = max_message_size; } + /// Set the compression options to be used by the server. + void SetCompressionOptions(const grpc_compression_options& options) { + compression_options_ = options; + } + /// Tries to bind \a server to the given \a addr. /// /// It can be invoked multiple times. @@ -133,6 +139,7 @@ class ServerBuilder { }; int max_message_size_; + grpc_compression_options compression_options_; std::vector<std::unique_ptr<NamedService<RpcService>>> services_; std::vector<std::unique_ptr<NamedService<AsynchronousService>>> async_services_; |