| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Net::WebSocket::PMCE::Data; |
|
2
|
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
729
|
use strict; |
|
|
3
|
|
|
|
|
6
|
|
|
|
3
|
|
|
|
|
64
|
|
|
4
|
3
|
|
|
3
|
|
12
|
use warnings; |
|
|
3
|
|
|
|
|
6
|
|
|
|
3
|
|
|
|
|
155
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=encoding utf-8 |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Net::WebSocket::PMCE::Data - Base class for PMCE data modules. |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 METHODS |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Available on all instances: |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head2 I->message_is_compressed( MESSAGE ) |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
MESSAGE is an instance of L. |
|
21
|
|
|
|
|
|
|
The output is a Perl boolean that indicates whether the message |
|
22
|
|
|
|
|
|
|
appears to be PMCE-compressed. |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
You can also call this as a class method, e.g.: |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Net::WebSocket::PMCE->message_is_compressed( $message_obj ); |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=cut |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub message_is_compressed { |
|
31
|
0
|
|
|
0
|
1
|
|
return ($_[1]->get_frames())[0]->has_rsv1(); |
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head2 INITIAL_FRAME_RSV() |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Returns the numeric value of the RSV bits for PMCEs, |
|
37
|
|
|
|
|
|
|
suitable for giving to a L subclass’s |
|
38
|
|
|
|
|
|
|
constructor. |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=cut |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
use constant { |
|
43
|
3
|
|
|
|
|
209
|
INITIAL_FRAME_RSV => 0b100, #RSV1 |
|
44
|
3
|
|
|
3
|
|
14
|
}; |
|
|
3
|
|
|
|
|
4
|
|
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |