|
||||
File indexing completed on 2025-01-18 09:29:35
0001 // 0002 // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com) 0003 // 0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying 0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 0006 // 0007 // Official repository: https://github.com/boostorg/beast 0008 // 0009 0010 #ifndef BOOST_BEAST_WEBSOCKET_OPTION_HPP 0011 #define BOOST_BEAST_WEBSOCKET_OPTION_HPP 0012 0013 #include <boost/beast/core/detail/config.hpp> 0014 0015 namespace boost { 0016 namespace beast { 0017 namespace websocket { 0018 0019 /** permessage-deflate extension options. 0020 0021 These settings control the permessage-deflate extension, 0022 which allows messages to be compressed. 0023 0024 @note Objects of this type are used with 0025 @ref beast::websocket::stream::set_option. 0026 */ 0027 struct permessage_deflate 0028 { 0029 /// `true` to offer the extension in the server role 0030 bool server_enable = false; 0031 0032 /// `true` to offer the extension in the client role 0033 bool client_enable = false; 0034 0035 /** Maximum server window bits to offer 0036 0037 @note Due to a bug in ZLib, this value must be greater than 8. 0038 */ 0039 int server_max_window_bits = 15; 0040 0041 /** Maximum client window bits to offer 0042 0043 @note Due to a bug in ZLib, this value must be greater than 8. 0044 */ 0045 int client_max_window_bits = 15; 0046 0047 /// `true` if server_no_context_takeover desired 0048 bool server_no_context_takeover = false; 0049 0050 /// `true` if client_no_context_takeover desired 0051 bool client_no_context_takeover = false; 0052 0053 /// Deflate compression level 0..9 0054 int compLevel = 8; 0055 0056 /// Deflate memory level, 1..9 0057 int memLevel = 4; 0058 0059 /// The minimum size a message should have to be compressed 0060 std::size_t msg_size_threshold = 0; 0061 }; 0062 0063 } // websocket 0064 } // beast 0065 } // boost 0066 0067 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |