Branch Coverage

blib/lib/SockJS/Transport/WebSocket.pm
Criterion Covered Total %
branch 11 34 32.3


line true false branch
33 1 2 unless $hs->parse($fh)
43 0 0 if ($handle)
57 0 2 unless ($self->_parse($conn, $_[0]->rbuf))
81 2 2 unless ($self->{'handshake_done'})
83 0 2 unless $ok
88 0 2 if ($hs->is_body)
93 2 0 if ($hs->is_done) { }
106 2 0 if $handle
116 0 0 if ($handle)
125 2 0 unless $self->name eq 'raw_websocket'
139 0 0 unless length $message
141 0 0 if ($frame->rsv and $frame->rsv->[0])
146 0 0 unless IO::Compress::Deflate::deflate(\$message, \$uncompressed)
151 0 0 if ($self->name eq 'websocket') { }
154 0 0 unless (eval { do { $message = $json->decode($message) } })
159 0 0 unless $message and ref $message eq 'ARRAY'
170 0 4 if ($frame->is_close)