websocketpp  0.6.0
C++/Boost Asio based websocket client/server library
Namespaces | Classes | Variables
websocketpp::extensions::permessage_deflate Namespace Reference

Implementation of the draft permessage-deflate WebSocket extension. More...

Namespaces

 error
 Permessage deflate error values.
 

Classes

class  disabled
 Stub class for use when disabling permessage_deflate extension. More...
 
class  enabled
 

Variables

static uint8_t const default_s2c_max_window_bits = 15
 Default value for s2c_max_window_bits as defined by RFC6455.
 
static uint8_t const min_s2c_max_window_bits = 8
 Minimum value for s2c_max_window_bits as defined by RFC6455.
 
static uint8_t const max_s2c_max_window_bits = 15
 Maximum value for s2c_max_window_bits as defined by RFC6455.
 
static uint8_t const default_c2s_max_window_bits = 15
 Default value for c2s_max_window_bits as defined by RFC6455.
 
static uint8_t const min_c2s_max_window_bits = 8
 Minimum value for c2s_max_window_bits as defined by RFC6455.
 
static uint8_t const max_c2s_max_window_bits = 15
 Maximum value for c2s_max_window_bits as defined by RFC6455.
 

Detailed Description

Implementation of the draft permessage-deflate WebSocket extension.

permessage-deflate interface

is_implemented
bool is_implemented()
Returns whether or not the object implements the extension or not

is_enabled
bool is_enabled()
Returns whether or not the extension was negotiated for the current connection

generate_offer
std::string generate_offer() const
Create an extension offer string based on local policy

validate_response
lib::error_code validate_response(http::attribute_list const & response)
Negotiate the parameters of extension use

negotiate
err_str_pair negotiate(http::attribute_list const & attributes)
Negotiate the parameters of extension use

compress
lib::error_code compress(std::string const & in, std::string & out)
Compress the bytes in in and append them to out

decompress
lib::error_code decompress(uint8_t const * buf, size_t len, std::string & out)
Decompress len bytes from buf and append them to string out