line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::WebSocket::Base::DataFrame; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
1901
|
use strict; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
151
|
|
4
|
6
|
|
|
6
|
|
29
|
use warnings; |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
152
|
|
5
|
|
|
|
|
|
|
|
6
|
6
|
|
|
|
|
39
|
use parent qw( |
7
|
|
|
|
|
|
|
Net::WebSocket::Frame |
8
|
|
|
|
|
|
|
Net::WebSocket::Base::Typed |
9
|
6
|
|
|
6
|
|
28
|
); |
|
6
|
|
|
|
|
11
|
|
10
|
|
|
|
|
|
|
|
11
|
6
|
|
|
6
|
|
283
|
use constant is_control_frame => 0; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
1459
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub _assemble_length { |
14
|
59
|
|
|
59
|
|
100
|
my ($class, $payload_sr) = @_; |
15
|
|
|
|
|
|
|
|
16
|
59
|
|
|
|
|
88
|
my ($byte2, $len_len); |
17
|
|
|
|
|
|
|
|
18
|
59
|
100
|
|
|
|
151
|
if (length $$payload_sr < 126) { |
|
|
50
|
|
|
|
|
|
19
|
57
|
|
|
|
|
85
|
$byte2 = chr(length $$payload_sr); |
20
|
57
|
|
|
|
|
79
|
$len_len = q<>; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
elsif (length $$payload_sr < 65536) { |
23
|
2
|
|
|
|
|
3
|
$byte2 = "\x7e"; #126 |
24
|
2
|
|
|
|
|
10
|
$len_len = pack 'n', length $$payload_sr; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
else { |
27
|
0
|
|
|
|
|
0
|
$byte2 = "\x7f"; #127 |
28
|
0
|
|
|
|
|
0
|
$len_len = pack 'Q>', length $$payload_sr; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
59
|
|
|
|
|
157
|
return ($byte2, $len_len); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub set_fin { |
35
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
$self->_activate_highest_bit( $self->[$self->FIRST2], 0 ); |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
return $self; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |