diff options
Diffstat (limited to 'node_modules/uws/src/Extensions.h')
-rw-r--r-- | node_modules/uws/src/Extensions.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/node_modules/uws/src/Extensions.h b/node_modules/uws/src/Extensions.h new file mode 100644 index 0000000..763b4d2 --- /dev/null +++ b/node_modules/uws/src/Extensions.h @@ -0,0 +1,29 @@ +#ifndef EXTENSIONS_UWS_H +#define EXTENSIONS_UWS_H + +#include <string> + +namespace uWS { + +enum Options : unsigned int { + NO_OPTIONS = 0, + PERMESSAGE_DEFLATE = 1, + SERVER_NO_CONTEXT_TAKEOVER = 2, + CLIENT_NO_CONTEXT_TAKEOVER = 4, + NO_DELAY = 8 +}; + +template <bool isServer> +class ExtensionsNegotiator { +private: + int options; +public: + ExtensionsNegotiator(int wantedOptions); + std::string generateOffer(); + void readOffer(std::string offer); + int getNegotiatedOptions(); +}; + +} + +#endif // EXTENSIONS_UWS_H |