line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::WebSocket::Base::DataFrame; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
1239
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
101
|
|
4
|
3
|
|
|
3
|
|
35
|
use warnings; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
123
|
|
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
|
|
24
|
use parent qw( |
7
|
|
|
|
|
|
|
Net::WebSocket::Frame |
8
|
|
|
|
|
|
|
Net::WebSocket::Base::Typed |
9
|
3
|
|
|
3
|
|
20
|
); |
|
3
|
|
|
|
|
8
|
|
10
|
|
|
|
|
|
|
|
11
|
3
|
|
|
3
|
|
186
|
use constant is_control_frame => 0; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
675
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub _assemble_length { |
14
|
53
|
|
|
53
|
|
77
|
my ($class, $payload_sr) = @_; |
15
|
|
|
|
|
|
|
|
16
|
53
|
|
|
|
|
65
|
my ($byte2, $len_len); |
17
|
|
|
|
|
|
|
|
18
|
53
|
50
|
|
|
|
84
|
if (length $$payload_sr < 126) { |
|
|
0
|
|
|
|
|
|
19
|
53
|
|
|
|
|
67
|
$byte2 = chr(length $$payload_sr); |
20
|
53
|
|
|
|
|
68
|
$len_len = q<>; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
elsif (length $$payload_sr < 65536) { |
23
|
0
|
|
|
|
|
0
|
$byte2 = "\x7e"; #126 |
24
|
0
|
|
|
|
|
0
|
$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
|
53
|
|
|
|
|
114
|
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; |