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
|
|
|
|
|
|
|
my $frm = Net::WebSocket::Frame::text->new( |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
#This flag defaults to on |
14
|
|
|
|
|
|
|
fin => 1, |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
#Optional, can be either empty (default) or four random bytes |
17
|
|
|
|
|
|
|
mask => q<>, |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
payload_sr => \$payload_text, |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
$frm->get_type(); #"text" |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
$frm->is_control_frame(); #0 |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
my $mask = $frm->get_mask_bytes(); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
my $payload = $frm->get_payload(); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
my $serialized = $frm->to_bytes(); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
$frm->set_fin(); #turns on |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=cut |
35
|
|
|
|
|
|
|
|
36
|
3
|
|
|
3
|
|
1571
|
use strict; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
97
|
|
37
|
3
|
|
|
3
|
|
20
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
126
|
|
38
|
|
|
|
|
|
|
|
39
|
3
|
|
|
|
|
24
|
use parent qw( |
40
|
|
|
|
|
|
|
Net::WebSocket::Base::DataFrame |
41
|
3
|
|
|
3
|
|
18
|
); |
|
3
|
|
|
|
|
7
|
|
42
|
|
|
|
|
|
|
|
43
|
3
|
|
|
3
|
|
190
|
use constant get_opcode => 1; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
168
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |