line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::WebSocket::Base::ControlFrame; |
2
|
|
|
|
|
|
|
|
3
|
15
|
|
|
15
|
|
7412
|
use strict; |
|
15
|
|
|
|
|
44
|
|
|
15
|
|
|
|
|
466
|
|
4
|
15
|
|
|
15
|
|
87
|
use warnings; |
|
15
|
|
|
|
|
45
|
|
|
15
|
|
|
|
|
434
|
|
5
|
|
|
|
|
|
|
|
6
|
15
|
|
|
|
|
100
|
use parent qw( |
7
|
|
|
|
|
|
|
Net::WebSocket::Frame |
8
|
15
|
|
|
15
|
|
83
|
); |
|
15
|
|
|
|
|
33
|
|
9
|
|
|
|
|
|
|
|
10
|
15
|
|
|
15
|
|
800
|
use Net::WebSocket::X (); |
|
15
|
|
|
|
|
34
|
|
|
15
|
|
|
|
|
307
|
|
11
|
|
|
|
|
|
|
|
12
|
15
|
|
|
15
|
|
121
|
use constant get_fin => 1; |
|
15
|
|
|
|
|
34
|
|
|
15
|
|
|
|
|
975
|
|
13
|
15
|
|
|
15
|
|
93
|
use constant is_control => 1; |
|
15
|
|
|
|
|
47
|
|
|
15
|
|
|
|
|
2736
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub _assemble_length { |
16
|
61
|
|
|
61
|
|
130
|
my ($class, $payload_sr) = @_; |
17
|
|
|
|
|
|
|
|
18
|
61
|
50
|
|
|
|
163
|
if (length $$payload_sr > 125) { |
19
|
0
|
|
|
|
|
0
|
my $type = $class->get_type(); |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
0
|
die Net::WebSocket::X->create('ControlPayloadTooLong', $type, $$payload_sr); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
61
|
|
|
|
|
231
|
return( chr(length $$payload_sr), q<> ); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub new { |
28
|
61
|
|
|
61
|
0
|
1193
|
my ($class, @opts) = @_; |
29
|
|
|
|
|
|
|
|
30
|
61
|
|
|
|
|
255
|
return $class->SUPER::new( |
31
|
|
|
|
|
|
|
@opts, |
32
|
|
|
|
|
|
|
fin => 1, |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |