123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- #ifndef WEBSOCKETPP_EXTENSION_PERMESSAGE_DEFLATE_DISABLED_HPP
- #define WEBSOCKETPP_EXTENSION_PERMESSAGE_DEFLATE_DISABLED_HPP
- #include <websocketpp/common/cpp11.hpp>
- #include <websocketpp/common/stdint.hpp>
- #include <websocketpp/common/system_error.hpp>
- #include <websocketpp/http/constants.hpp>
- #include <websocketpp/extensions/extension.hpp>
- #include <map>
- #include <string>
- #include <utility>
- namespace websocketpp {
- namespace extensions {
- namespace permessage_deflate {
- template <typename config>
- class disabled {
- typedef std::pair<lib::error_code,std::string> err_str_pair;
- public:
-
-
- err_str_pair negotiate(http::attribute_list const &) {
- return make_pair(make_error_code(error::disabled),std::string());
- }
-
-
- lib::error_code init(bool) {
- return lib::error_code();
- }
-
-
- bool is_implemented() const {
- return false;
- }
-
-
- bool is_enabled() const {
- return false;
- }
-
-
- std::string generate_offer() const {
- return "";
- }
-
-
- lib::error_code compress(std::string const &, std::string &) {
- return make_error_code(error::disabled);
- }
-
-
- lib::error_code decompress(uint8_t const *, size_t, std::string &) {
- return make_error_code(error::disabled);
- }
- };
- }
- }
- }
- #endif
|