line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::WebSocket::Base::ControlFrame; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
1059
|
use strict; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
91
|
|
4
|
4
|
|
|
4
|
|
18
|
use warnings; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
91
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
|
|
30
|
use parent qw( |
7
|
|
|
|
|
|
|
Net::WebSocket::Frame |
8
|
|
|
|
|
|
|
Net::WebSocket::Base::Typed |
9
|
4
|
|
|
4
|
|
19
|
); |
|
4
|
|
|
|
|
7
|
|
10
|
|
|
|
|
|
|
|
11
|
4
|
|
|
4
|
|
168
|
use Net::WebSocket::X (); |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
68
|
|
12
|
|
|
|
|
|
|
|
13
|
4
|
|
|
4
|
|
16
|
use constant get_fin => 1; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
199
|
|
14
|
4
|
|
|
4
|
|
23
|
use constant is_control_frame => 1; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
531
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub _assemble_length { |
17
|
6
|
|
|
6
|
|
12
|
my ($class, $payload_sr) = @_; |
18
|
|
|
|
|
|
|
|
19
|
6
|
50
|
|
|
|
15
|
if (length $$payload_sr > 125) { |
20
|
0
|
|
|
|
|
0
|
my $type = $class->get_type(); |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
0
|
die Net::WebSocket::X->create('ControlPayloadTooLong', $type, $$payload_sr); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
6
|
|
|
|
|
21
|
return( chr(length $$payload_sr), q<> ); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub new { |
29
|
6
|
|
|
6
|
0
|
15
|
my ($class, @opts) = @_; |
30
|
|
|
|
|
|
|
|
31
|
6
|
|
|
|
|
22
|
return $class->SUPER::new( |
32
|
|
|
|
|
|
|
@opts, |
33
|
|
|
|
|
|
|
fin => 1, |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |