blob: 763b4d2cbdafa6be319c6649eefa211aa58d33e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
|