NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
websocketpp::extensions::permessage_deflate::disabled< config > Class Template Reference

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

#include <disabled.hpp>

Public Member Functions

err_str_pair negotiate (http::attribute_list const &)
 Negotiate extension. More...
 
lib::error_code init (bool)
 Initialize state. More...
 
bool is_implemented () const
 Returns true if the extension is capable of providing permessage_deflate functionality. More...
 
bool is_enabled () const
 Returns true if permessage_deflate functionality is active for this connection. More...
 
std::string generate_offer () const
 Generate extension offer. More...
 
lib::error_code compress (std::string const &, std::string &)
 Compress bytes. More...
 
lib::error_code decompress (uint8_t const *, size_t, std::string &)
 Decompress bytes. More...
 

Detailed Description

template<typename config>
class websocketpp::extensions::permessage_deflate::disabled< config >

Stub class for use when disabling permessage_deflate extension.

This class is a stub that implements the permessage_deflate interface with minimal dependencies. It is used to disable permessage_deflate functionality at compile time without loading any unnecessary code.

Definition at line 53 of file disabled.hpp.

Member Function Documentation

◆ negotiate()

template<typename config >
err_str_pair websocketpp::extensions::permessage_deflate::disabled< config >::negotiate ( http::attribute_list const &  )
inline

Negotiate extension.

The disabled extension always fails the negotiation with a disabled error.

Parameters
offerAttribute from client's offer
Returns
Status code and value to return to remote endpoint

Definition at line 65 of file disabled.hpp.

References websocketpp::extensions::error::disabled, and websocketpp::error::make_error_code().

◆ init()

template<typename config >
lib::error_code websocketpp::extensions::permessage_deflate::disabled< config >::init ( bool  )
inline

Initialize state.

For the disabled extension state initialization is a no-op.

Parameters
is_serverTrue to initialize as a server, false for a client.
Returns
A code representing the error that occurred, if any

Definition at line 76 of file disabled.hpp.

◆ is_implemented()

template<typename config >
bool websocketpp::extensions::permessage_deflate::disabled< config >::is_implemented ( ) const
inline

Returns true if the extension is capable of providing permessage_deflate functionality.

Definition at line 82 of file disabled.hpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ is_enabled()

template<typename config >
bool websocketpp::extensions::permessage_deflate::disabled< config >::is_enabled ( ) const
inline

Returns true if permessage_deflate functionality is active for this connection.

Definition at line 88 of file disabled.hpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ generate_offer()

template<typename config >
std::string websocketpp::extensions::permessage_deflate::disabled< config >::generate_offer ( ) const
inline

Generate extension offer.

Creates an offer string to include in the Sec-WebSocket-Extensions header of outgoing client requests.

Returns
A WebSocket extension offer string for this extension

Definition at line 99 of file disabled.hpp.

◆ compress()

template<typename config >
lib::error_code websocketpp::extensions::permessage_deflate::disabled< config >::compress ( std::string const &  ,
std::string &   
)
inline

Compress bytes.

Parameters
[in]inString to compress
[out]outString to append compressed bytes to
Returns
Error or status code

Definition at line 109 of file disabled.hpp.

References websocketpp::extensions::error::disabled, and websocketpp::error::make_error_code().

◆ decompress()

template<typename config >
lib::error_code websocketpp::extensions::permessage_deflate::disabled< config >::decompress ( uint8_t const *  ,
size_t  ,
std::string &   
)
inline

Decompress bytes.

Parameters
bufByte buffer to decompress
lenLength of buf
outString to append decompressed bytes to
Returns
Error or status code

Definition at line 120 of file disabled.hpp.

References websocketpp::extensions::error::disabled, and websocketpp::error::make_error_code().


The documentation for this class was generated from the following file: