| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
#pragma once |
|
2
|
|
|
|
|
|
|
#include "Parser.h" |
|
3
|
|
|
|
|
|
|
#include "ConnectRequest.h" |
|
4
|
|
|
|
|
|
|
#include "ConnectResponse.h" |
|
5
|
|
|
|
|
|
|
#include |
|
6
|
|
|
|
|
|
|
#include |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
namespace panda { namespace protocol { namespace websocket { |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
using panda::string; |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
struct ClientParser : Parser { |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
ClientParser (const Parser::Config& cfg = {}) : Parser(false, cfg), _connect_response_parser() {} |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
string connect_request (const ConnectRequestSP& req); |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
ConnectResponseSP connect (string& buf); |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
virtual void reset (); |
|
21
|
|
|
|
|
|
|
|
|
22
|
384
|
50
|
|
|
|
|
virtual ~ClientParser () {} |
|
|
|
50
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
private: |
|
25
|
|
|
|
|
|
|
static const int CONNECTION_REQUESTED = LAST_FLAG + 1; |
|
26
|
|
|
|
|
|
|
static const int CONNECTION_RESPONSE_PARSED = CONNECTION_REQUESTED + 1; |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
ConnectRequestSP _connect_request; |
|
29
|
|
|
|
|
|
|
ConnectResponseSP _connect_response; |
|
30
|
|
|
|
|
|
|
http::ResponseParser _connect_response_parser; |
|
31
|
|
|
|
|
|
|
}; |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
}}} |