line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#pragma once |
2
|
|
|
|
|
|
|
#include "HeaderValueParamsParser.h" |
3
|
|
|
|
|
|
|
#include |
4
|
|
|
|
|
|
|
#include |
5
|
|
|
|
|
|
|
#include |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
namespace panda { namespace protocol { namespace websocket { |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
struct ConnectResponse : http::Response { |
10
|
|
|
|
|
|
|
string ws_protocol; |
11
|
|
|
|
|
|
|
ErrorCode error; |
12
|
|
|
|
|
|
|
|
13
|
0
|
0
|
|
|
|
|
ConnectResponse () : _ws_extensions_set(false) {} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
virtual void process_headers (); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
const string& ws_accept_key () const { return _ws_accept_key; } |
18
|
|
|
|
|
|
|
const string& ws_version () const { return _ws_version; } |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
const HeaderValues& ws_extensions () const { return _ws_extensions; } |
21
|
|
|
|
|
|
|
bool ws_extensions_set () const { return _ws_extensions_set; } |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
void ws_extensions (const HeaderValues& new_extensions) { |
24
|
0
|
|
|
|
|
|
_ws_extensions = new_extensions; |
25
|
0
|
|
|
|
|
|
_ws_extensions_set = true; |
26
|
0
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
string to_string(); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
friend struct ServerParser; |
31
|
|
|
|
|
|
|
friend struct ClientParser; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
protected: |
34
|
|
|
|
|
|
|
// virtual void _to_string (string& str); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
private: |
37
|
|
|
|
|
|
|
string _ws_key; |
38
|
|
|
|
|
|
|
HeaderValues _ws_extensions; |
39
|
|
|
|
|
|
|
bool _ws_extensions_set; |
40
|
|
|
|
|
|
|
string _ws_accept_key; |
41
|
|
|
|
|
|
|
string _ws_version; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
string _calc_accept_key (string ws_key); |
44
|
|
|
|
|
|
|
}; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
using ConnectResponseSP = panda::iptr; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
}}} |