File Coverage

xsi/ConnectRequest.xsi
Criterion Covered Total %
statement 14 26 53.8
branch 11 42 26.1
condition n/a
subroutine n/a
pod n/a
total 25 68 36.7


line stmt bran cond sub pod time code
1             MODULE = Protocol::WebSocket::Fast PACKAGE = Protocol::WebSocket::Fast::ConnectRequest
2             PROTOTYPES: DISABLE
3              
4             BOOT {
5 18 50         Stash(__PACKAGE__).inherit("Protocol::HTTP::Request");
    50          
6             }
7              
8             ConnectRequestSP ConnectRequest::new (Hash params = Hash()) {
9 166           RETVAL = new ConnectRequest();
10 83 50         make_request(params, RETVAL);
11 83 50         }
    50          
12 83 50          
13             string ConnectRequest::ws_key (SV* newval = NULL) {
14 2 50         if (newval) {
15 0 0         THIS->ws_key = xs::in(newval);
    0          
16 0           XSRETURN_UNDEF;
17             }
18 2 50         RETVAL = THIS->ws_key;
19             }
20              
21             int ConnectRequest::ws_version (SV* newval = NULL) {
22 3 50         if (newval) {
23 0 0         THIS->ws_version = SvIV(newval);
    0          
24 3           XSRETURN_UNDEF;
25             }
26 3           RETVAL = THIS->ws_version;
27             }
28              
29             Array ConnectRequest::ws_extensions (Array exts_av = Array()) {
30 0 0         if (exts_av) {
31 0           HeaderValues exts;
32 0 0         av_to_header_values(exts_av, &exts);
33 0 0         THIS->ws_extensions(exts);
34 0           XSRETURN_UNDEF;
35             }
36            
37 0 0         RETVAL = header_values_to_av(THIS->ws_extensions());
38             }
39              
40             string ConnectRequest::ws_protocol (SV* newval = NULL) {
41 2 50         if (newval) {
42 0 0         THIS->ws_protocol = xs::in(newval);
    0          
43 0           XSRETURN_UNDEF;
44             }
45 2 50         RETVAL = THIS->ws_protocol;
46             }
47              
48 0           bool ConnectRequest::ws_version_supported ()
49              
50             ErrorCode ConnectRequest::error () {
51 122           RETVAL = THIS->error;
52 61           }