2 // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 // Official repository: https://github.com/boostorg/beast
10 #ifndef BOOST_BEAST_WEBSOCKET_OPTION_HPP
11 #define BOOST_BEAST_WEBSOCKET_OPTION_HPP
13 #include <boost/beast/core/detail/config.hpp>
19 /** permessage-deflate extension options.
21 These settings control the permessage-deflate extension,
22 which allows messages to be compressed.
24 @note Objects of this type are used with
25 @ref beast::websocket::stream::set_option.
27 struct permessage_deflate
29 /// `true` to offer the extension in the server role
30 bool server_enable = false;
32 /// `true` to offer the extension in the client role
33 bool client_enable = false;
35 /** Maximum server window bits to offer
37 @note Due to a bug in ZLib, this value must be greater than 8.
39 int server_max_window_bits = 15;
41 /** Maximum client window bits to offer
43 @note Due to a bug in ZLib, this value must be greater than 8.
45 int client_max_window_bits = 15;
47 /// `true` if server_no_context_takeover desired
48 bool server_no_context_takeover = false;
50 /// `true` if client_no_context_takeover desired
51 bool client_no_context_takeover = false;
53 /// Deflate compression level 0..9
56 /// Deflate memory level, 1..9