line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::WebSocket::Base::ControlFrame; |
2
|
|
|
|
|
|
|
|
3
|
13
|
|
|
13
|
|
4753
|
use strict; |
|
13
|
|
|
|
|
25
|
|
|
13
|
|
|
|
|
281
|
|
4
|
13
|
|
|
13
|
|
59
|
use warnings; |
|
13
|
|
|
|
|
20
|
|
|
13
|
|
|
|
|
272
|
|
5
|
|
|
|
|
|
|
|
6
|
13
|
|
|
|
|
74
|
use parent qw( |
7
|
|
|
|
|
|
|
Net::WebSocket::Frame |
8
|
13
|
|
|
13
|
|
50
|
); |
|
13
|
|
|
|
|
30
|
|
9
|
|
|
|
|
|
|
|
10
|
13
|
|
|
13
|
|
517
|
use Net::WebSocket::X (); |
|
13
|
|
|
|
|
22
|
|
|
13
|
|
|
|
|
204
|
|
11
|
|
|
|
|
|
|
|
12
|
13
|
|
|
13
|
|
49
|
use constant get_fin => 1; |
|
13
|
|
|
|
|
24
|
|
|
13
|
|
|
|
|
578
|
|
13
|
13
|
|
|
13
|
|
76
|
use constant is_control => 1; |
|
13
|
|
|
|
|
21
|
|
|
13
|
|
|
|
|
1650
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub _assemble_length { |
16
|
26
|
|
|
26
|
|
50
|
my ($class, $payload_sr) = @_; |
17
|
|
|
|
|
|
|
|
18
|
26
|
50
|
|
|
|
64
|
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
|
26
|
|
|
|
|
90
|
return( chr(length $$payload_sr), q<> ); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub new { |
28
|
26
|
|
|
26
|
0
|
855
|
my ($class, @opts) = @_; |
29
|
|
|
|
|
|
|
|
30
|
26
|
|
|
|
|
98
|
return $class->SUPER::new( |
31
|
|
|
|
|
|
|
@opts, |
32
|
|
|
|
|
|
|
fin => 1, |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |