![]() |
|
|||
File indexing completed on 2025-07-05 08:28:04
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 0025 0026 These settings should be configured before performing the WebSocket 0027 handshake. 0028 0029 Objects of this type are used with 0030 @ref beast::websocket::stream::set_option. 0031 */ 0032 struct permessage_deflate 0033 { 0034 /// `true` to offer the extension in the server role 0035 bool server_enable = false; 0036 0037 /// `true` to offer the extension in the client role 0038 bool client_enable = false; 0039 0040 /** Maximum server window bits to offer 0041 0042 @note Due to a bug in ZLib, this value must be greater than 8. 0043 */ 0044 int server_max_window_bits = 15; 0045 0046 /** Maximum client window bits to offer 0047 0048 @note Due to a bug in ZLib, this value must be greater than 8. 0049 */ 0050 int client_max_window_bits = 15; 0051 0052 /// `true` if server_no_context_takeover desired 0053 bool server_no_context_takeover = false; 0054 0055 /// `true` if client_no_context_takeover desired 0056 bool client_no_context_takeover = false; 0057 0058 /// Deflate compression level 0..9 0059 int compLevel = 8; 0060 0061 /// Deflate memory level, 1..9 0062 int memLevel = 4; 0063 0064 /// The minimum size a message should have to be compressed 0065 std::size_t msg_size_threshold = 0; 0066 }; 0067 0068 } // websocket 0069 } // beast 0070 } // boost 0071 0072 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |