Wire Sysio Wire Sysion 1.0.0
|
#include <boost/test/unit_test.hpp>
#include <iostream>
#include <string>
#include <websocketpp/common/memory.hpp>
#include <websocketpp/http/request.hpp>
#include <websocketpp/extensions/permessage_deflate/enabled.hpp>
Go to the source code of this file.
Classes | |
struct | config |
Macros | |
#define | BOOST_TEST_MODULE extension_permessage_deflate |
Typedefs | |
typedef websocketpp::extensions::permessage_deflate::enabled< config > | compressor_type |
Functions | |
BOOST_AUTO_TEST_CASE (deflate_init) | |
#define BOOST_TEST_MODULE extension_permessage_deflate |
Definition at line 28 of file extension_permessage_compress.cpp.
Definition at line 42 of file extension_permessage_compress.cpp.
BOOST_AUTO_TEST_CASE | ( | deflate_init | ) |
Window size is primarily controlled by the writer. A stream can only be read by a window size equal to or greater than the one use to compress it initially. The default windows size is also the maximum window size. Thus:
Outbound window size can be limited unilaterally under the assumption that the opposite end will be using the default (maximum size which can read anything)
Inbound window size must be limited by asking the remote endpoint to do so and it agreeing.
Context takeover is also primarily controlled by the writer. If the compressor does not clear its context between messages then the reader can't either.
Outbound messages may clear context between messages unilaterally. Inbound messages must retain state unless the remote endpoint signals otherwise.
Negotiation options: Client must choose from the following options:
Server must answer in the following ways
All Defaults Req: permessage-compress; method=deflate Ans: permessage-compress; method=deflate
permessage-compress; method="deflate; s2c_max_window_bits=8, deflate" Ans: permessage-compress; method="deflate; s2c_max_window_bits=8" OR Ans: permessage-compress; method=deflate
Client: permessage-compress; method="deflate; c2s_max_window_bits, deflate"
Server: permessage-compress; method="deflate; c2s_max_window_bits=8"
Definition at line 46 of file extension_permessage_compress.cpp.