line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::WebSocket::Frame::text; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=encoding utf-8 |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
Net::WebSocket::Frame::text |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
B Before you instantiate this class directly, look at |
12
|
|
|
|
|
|
|
L’s C convenience |
13
|
|
|
|
|
|
|
method to make your life easier. |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my $frm = Net::WebSocket::Frame::text->new( |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
#This flag defaults to on |
18
|
|
|
|
|
|
|
fin => 1, |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
#For servers, this must be empty (default). |
21
|
|
|
|
|
|
|
#For clients, this must be four random bytes. |
22
|
|
|
|
|
|
|
mask => q<>, |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
payload => $payload_text, |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
$frm->get_type(); #"text" |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
$frm->is_control(); #0 |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
my $mask = $frm->get_mask_bytes(); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
my $payload = $frm->get_payload(); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my $serialized = $frm->to_bytes(); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
$frm->set_fin(); #turns on |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |
40
|
|
|
|
|
|
|
|
41
|
13
|
|
|
13
|
|
274814
|
use strict; |
|
13
|
|
|
|
|
66
|
|
|
13
|
|
|
|
|
446
|
|
42
|
13
|
|
|
13
|
|
90
|
use warnings; |
|
13
|
|
|
|
|
46
|
|
|
13
|
|
|
|
|
387
|
|
43
|
|
|
|
|
|
|
|
44
|
13
|
|
|
|
|
69
|
use parent qw( |
45
|
|
|
|
|
|
|
Net::WebSocket::Base::DataFrame |
46
|
13
|
|
|
13
|
|
1509
|
); |
|
13
|
|
|
|
|
942
|
|
47
|
|
|
|
|
|
|
|
48
|
13
|
|
|
13
|
|
659
|
use constant get_opcode => 1; |
|
13
|
|
|
|
|
42
|
|
|
13
|
|
|
|
|
828
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |