Add permessage-deflate WebSocket extension:

This implements the permessage-deflate WebSocket
extension as described in HyBi Working Group
draft-ietf-hybi-permessage-compression-28:
https://tools.ietf.org/html/draft-ietf-hybi-permessage-compression-28

This extension allows messages to be compressed using
the raw "deflate" algorithm described in RFC 1951,
"DEFLATE Compressed Data Format Specification version 1.3":
https://www.ietf.org/rfc/rfc1951.txt
This commit is contained in:
Vinnie Falco
2017-07-20 08:12:14 -07:00
parent 99706347cd
commit 911617c43f
26 changed files with 2404 additions and 1324 deletions
+9 -4
View File
@@ -12,18 +12,23 @@
int main()
{
using namespace beast::websocket;
using endpoint_type = boost::asio::ip::tcp::endpoint;
using address_type = boost::asio::ip::address;
try
{
boost::system::error_code ec;
beast::websocket::async_echo_server s1{nullptr, 1};
s1.open(true, endpoint_type{
beast::error_code ec;
async_echo_server s1{nullptr, 1};
s1.open(endpoint_type{
address_type::from_string("127.0.0.1"), 6000 }, ec);
s1.set_option(read_message_max{64 * 1024 * 1024});
s1.set_option(auto_fragment{false});
//s1.set_option(write_buffer_size{64 * 1024});
beast::websocket::sync_echo_server s2(true, endpoint_type{
beast::websocket::sync_echo_server s2(&std::cout, endpoint_type{
address_type::from_string("127.0.0.1"), 6001 });
s2.set_option(read_message_max{64 * 1024 * 1024});
beast::test::sig_wait();
}