WebSocket/Frame/binary.pm

filter: Statementstmt 100% 13 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 17 / 17 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« WebSocket/Endpoint/Server.pm ↑ Summary WebSocket/Frame/continuation.pm »
1 package Net::WebSocket::Frame::binary;
2  
3 =encoding utf-8
4  
5 =head1 NAME
6  
7 Net::WebSocket::Frame::binary
8  
9 =head1 SYNOPSIS
10  
11 my $frm = Net::WebSocket::Frame::binary->new(
12  
13 #This flag defaults to on
14 fin => 1,
15  
16 #Optional, can be either empty (default) or four random bytes
17 mask => q<>,
18  
19 payload => $payload_octet_string,
20 );
21  
22 $frm->get_type(); #"binary"
23  
24 $frm->is_control(); #0
25  
26 my $mask = $frm->get_mask_bytes();
27  
28 my $payload = $frm->get_payload();
29  
30 my $serialized = $frm->to_bytes();
31  
32 $frm->set_fin(); #turns on
33  
34 =cut
35  
36 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
37 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
38  
39 4 ▶use parent qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
40 Net::WebSocket::Base::DataFrame
41 4 );
42  
43 4 ▶use constant get_opcode => 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
44  
45 4 1;
« WebSocket/Endpoint/Server.pm ↑ Summary WebSocket/Frame/continuation.pm »