Branch Coverage

blib/lib/SockJS/Transport/WebSocket.pm
Criterion Covered Total %
branch 11 36 30.5


line true false branch
33 1 2 unless $hs->parse($fh)
43 0 0 if ($handle)
53 0 0 if ($fh)
64 0 2 unless ($self->_parse($conn, $_[0]->rbuf))
88 2 2 unless ($self->{'handshake_done'})
90 0 2 unless $ok
95 0 2 if ($hs->is_body)
100 2 0 if ($hs->is_done) { }
113 2 0 if $handle
123 0 0 if ($handle)
133 2 0 unless $self->name eq 'raw_websocket'
147 0 0 unless length $message
149 0 0 if ($frame->rsv and $frame->rsv->[0])
154 0 0 unless IO::Compress::Deflate::deflate(\$message, \$uncompressed)
159 0 0 if ($self->name eq 'websocket') { }
162 0 0 unless (eval { do { $message = $json->decode($message) } })
167 0 0 unless $message and ref $message eq 'ARRAY'
178 0 4 if ($frame->is_close)