line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::WebSocket::Base::ControlFrame; |
2
|
|
|
|
|
|
|
|
3
|
15
|
|
|
15
|
|
7191
|
use strict; |
|
15
|
|
|
|
|
40
|
|
|
15
|
|
|
|
|
431
|
|
4
|
15
|
|
|
15
|
|
94
|
use warnings; |
|
15
|
|
|
|
|
29
|
|
|
15
|
|
|
|
|
455
|
|
5
|
|
|
|
|
|
|
|
6
|
15
|
|
|
|
|
106
|
use parent qw( |
7
|
|
|
|
|
|
|
Net::WebSocket::Frame |
8
|
15
|
|
|
15
|
|
82
|
); |
|
15
|
|
|
|
|
27
|
|
9
|
|
|
|
|
|
|
|
10
|
15
|
|
|
15
|
|
801
|
use Net::WebSocket::X (); |
|
15
|
|
|
|
|
37
|
|
|
15
|
|
|
|
|
309
|
|
11
|
|
|
|
|
|
|
|
12
|
15
|
|
|
15
|
|
88
|
use constant get_fin => 1; |
|
15
|
|
|
|
|
92
|
|
|
15
|
|
|
|
|
870
|
|
13
|
15
|
|
|
15
|
|
91
|
use constant is_control => 1; |
|
15
|
|
|
|
|
32
|
|
|
15
|
|
|
|
|
2560
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub _assemble_length { |
16
|
62
|
|
|
62
|
|
138
|
my ($class, $payload_sr) = @_; |
17
|
|
|
|
|
|
|
|
18
|
62
|
50
|
|
|
|
484
|
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
|
62
|
|
|
|
|
246
|
return( chr(length $$payload_sr), q<> ); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub new { |
28
|
62
|
|
|
62
|
0
|
1377
|
my ($class, @opts) = @_; |
29
|
|
|
|
|
|
|
|
30
|
62
|
|
|
|
|
256
|
return $class->SUPER::new( |
31
|
|
|
|
|
|
|
@opts, |
32
|
|
|
|
|
|
|
fin => 1, |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |