File Coverage

Fast.xs
Criterion Covered Total %
statement 6 6 100.0
branch 27 56 48.2
condition n/a
subroutine n/a
pod n/a
total 33 62 53.2


line stmt bran cond sub pod time code
1             #include
2             #include
3             #include
4              
5             #include
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 36 50         Stash me(__PACKAGE__);
26 360 50         create_constants(me, {
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    50          
    100          
    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 342 50         });
47 18 50         autoexport(me);
    50          
48            
49 36 50         auto err = panda::protocol::websocket::DeflateExt::bootstrap();
50 18 50         if (err) throw *err;
    0          
51             }
52              
53             INCLUDE: xsi/Parser.xsi
54              
55             INCLUDE: xsi/ServerParser.xsi
56              
57             INCLUDE: xsi/ClientParser.xsi
58              
59             INCLUDE: xsi/ConnectRequest.xsi
60              
61             INCLUDE: xsi/ConnectResponse.xsi
62              
63             INCLUDE: xsi/Frame.xsi
64              
65             INCLUDE: xsi/FrameSender.xsi
66              
67             INCLUDE: xsi/FrameIterator.xsi
68              
69             INCLUDE: xsi/Message.xsi
70              
71             INCLUDE: xsi/MessageIterator.xsi
72              
73             INCLUDE: xsi/Error.xsi