| 1 |
|
| #include <xs/protocol/websocket.h> |
| 2 |
|
| #include <xs/uri.h> |
| 3 |
|
| #include <xs/export.h> |
| 4 |
|
| |
| 5 |
|
| #include <iostream> |
| 6 |
|
| |
| 7 |
|
| using namespace xs; |
| 8 |
|
| using xs::exp::autoexport; |
| 9 |
|
| using xs::exp::create_constant; |
| 10 |
|
| using xs::exp::create_constants; |
| 11 |
|
| |
| 12 |
|
| using panda::string; |
| 13 |
|
| using panda::string_view; |
| 14 |
|
| using panda::ErrorCode; |
| 15 |
|
| using xs::my_perl; |
| 16 |
|
| |
| 17 |
|
| using namespace xs::protocol::websocket; |
| 18 |
|
| using namespace panda::protocol::websocket; |
| 19 |
|
| using xs::protocol::http::strings_to_sv; |
| 20 |
|
| |
| 21 |
|
| MODULE = Protocol::WebSocket::Fast PACKAGE = Protocol::WebSocket::Fast |
| 22 |
|
| PROTOTYPES: DISABLE |
| 23 |
|
| |
| 24 |
|
| BOOT { |
| 25 |
0 |
▶ | Stash me(__PACKAGE__); |
Branch: 1 branch
| Branch | True | False | Total |
| Stash me(__PACKAGE__); |
0 |
0 |
0 |
|
| 26 |
0 |
▶ | create_constants(me, { |
Branch: 4 branches
| Branch | True | False | Total |
| create_constants(me, { |
0 |
0 |
0 |
| create_constants(me, { |
0 |
0 |
0 |
| create_constants(me, { |
0 |
0 |
0 |
| create_constants(me, { |
0 |
0 |
0 |
|
| 27 |
|
| {"OPCODE_CONTINUE", (int)Opcode::CONTINUE}, |
| 28 |
|
| {"OPCODE_TEXT", (int)Opcode::TEXT }, |
| 29 |
|
| {"OPCODE_BINARY", (int)Opcode::BINARY }, |
| 30 |
|
| {"OPCODE_CLOSE", (int)Opcode::CLOSE }, |
| 31 |
|
| {"OPCODE_PING", (int)Opcode::PING }, |
| 32 |
|
| {"OPCODE_PONG", (int)Opcode::PONG }, |
| 33 |
|
| |
| 34 |
|
| {"CLOSE_DONE", (int)CloseCode::DONE }, |
| 35 |
|
| {"CLOSE_AWAY", (int)CloseCode::AWAY }, |
| 36 |
|
| {"CLOSE_PROTOCOL_ERROR", (int)CloseCode::PROTOCOL_ERROR }, |
| 37 |
|
| {"CLOSE_INVALID_DATA", (int)CloseCode::INVALID_DATA }, |
| 38 |
|
| {"CLOSE_UNKNOWN", (int)CloseCode::UNKNOWN }, |
| 39 |
|
| {"CLOSE_ABNORMALLY", (int)CloseCode::ABNORMALLY }, |
| 40 |
|
| {"CLOSE_INVALID_TEXT", (int)CloseCode::INVALID_TEXT }, |
| 41 |
|
| {"CLOSE_BAD_REQUEST", (int)CloseCode::BAD_REQUEST }, |
| 42 |
|
| {"CLOSE_MAX_SIZE", (int)CloseCode::MAX_SIZE }, |
| 43 |
|
| {"CLOSE_EXTENSION_NEEDED", (int)CloseCode::EXTENSION_NEEDED}, |
| 44 |
|
| {"CLOSE_INTERNAL_ERROR", (int)CloseCode::INTERNAL_ERROR }, |
| 45 |
|
| {"CLOSE_TLS", (int)CloseCode::TLS } |
| 46 |
|
| }); |
| 47 |
0 |
▶ | autoexport(me); |
Branch: 2 branches
| Branch | True | False | Total |
| autoexport(me); |
0 |
0 |
0 |
| autoexport(me); |
0 |
0 |
0 |
|
| 48 |
|
| |
| 49 |
0 |
▶ | auto errstr = DeflateExt::bootstrap(); |
Branch: 1 branch
| Branch | True | False | Total |
| auto errstr = DeflateExt::bootstrap(); |
0 |
0 |
0 |
|
| 50 |
0 |
▶ | if (!errstr.empty()) throw Error(errstr); |
Branch: 1 branch
| Branch | True | False | Total |
| if (!errstr.empty()) throw Error(errstr); |
0 |
0 |
0 |
|
| 51 |
0 |
| } |
| 52 |
|
| |
| 53 |
|
| INCLUDE: Parser.xsi |
| 54 |
|
| |
| 55 |
|
| INCLUDE: ServerParser.xsi |
| 56 |
|
| |
| 57 |
|
| INCLUDE: ClientParser.xsi |
| 58 |
|
| |
| 59 |
|
| INCLUDE: ConnectRequest.xsi |
| 60 |
|
| |
| 61 |
|
| INCLUDE: ConnectResponse.xsi |
| 62 |
|
| |
| 63 |
|
| INCLUDE: Frame.xsi |
| 64 |
|
| |
| 65 |
|
| INCLUDE: FrameSender.xsi |
| 66 |
|
| |
| 67 |
|
| INCLUDE: FrameIterator.xsi |
| 68 |
|
| |
| 69 |
|
| INCLUDE: Message.xsi |
| 70 |
|
| |
| 71 |
|
| INCLUDE: MessageIterator.xsi |
| 72 |
|
| |
| 73 |
|
| INCLUDE: Error.xsi |