diff options
author | 2015-06-16 14:27:32 -0700 | |
---|---|---|
committer | 2015-06-16 14:27:32 -0700 | |
commit | 55b4ea1f07708320ed78fc8770472a8e28b399c9 (patch) | |
tree | 5d69a9bbd9485312bec11ceb15b8694af9a2b300 /src/core/surface/channel_create.c | |
parent | 9c941ed983ea5b70a0d5bd4cee5f298b236337c6 (diff) |
WIP. Compiles and tests pass. Need to write specific tests.
Diffstat (limited to 'src/core/surface/channel_create.c')
-rw-r--r-- | src/core/surface/channel_create.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/surface/channel_create.c b/src/core/surface/channel_create.c index 946ee0949d..e7804047a0 100644 --- a/src/core/surface/channel_create.c +++ b/src/core/surface/channel_create.c @@ -33,24 +33,25 @@ #include "src/core/iomgr/sockaddr.h" -#include <grpc/grpc.h> #include <stdlib.h> #include <string.h> -#include "src/core/channel/census_filter.h" #include "src/core/channel/channel_args.h" #include "src/core/channel/client_channel.h" #include "src/core/channel/client_setup.h" +#include "src/core/channel/compress_filter.h" #include "src/core/channel/connected_channel.h" #include "src/core/channel/http_client_filter.h" #include "src/core/iomgr/endpoint.h" #include "src/core/iomgr/resolve_address.h" #include "src/core/iomgr/tcp_client.h" +#include "src/core/support/string.h" #include "src/core/surface/channel.h" #include "src/core/surface/client.h" -#include "src/core/support/string.h" #include "src/core/transport/chttp2_transport.h" + +#include <grpc/grpc.h> #include <grpc/support/alloc.h> #include <grpc/support/log.h> #include <grpc/support/string_util.h> @@ -200,6 +201,10 @@ grpc_channel *grpc_channel_create(const char *target, if (grpc_channel_args_is_census_enabled(args)) { filters[n++] = &grpc_client_census_filter; } */ + if (grpc_channel_args_get_compression_level(args) > + GRPC_COMPRESS_LEVEL_NONE) { + filters[n++] = &grpc_compress_filter; + } filters[n++] = &grpc_client_channel_filter; GPR_ASSERT(n <= MAX_FILTERS); channel = grpc_channel_create_from_filters(filters, n, args, mdctx, 1); |