line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::WebSocket::Frame::pong; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=encoding utf-8 |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=HEAD1 |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
Net::WebSocket::Frame::pong |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my $frm = Net::WebSocket::Frame::pong->new( |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
#Optional, can be either empty (default) or four random bytes |
14
|
|
|
|
|
|
|
mask => q<>, |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
payload_sr => \$payload, |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
$frm->get_type(); #"ping" |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
$frm->is_control_frame(); #1 |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
my $mask = $frm->get_mask_bytes(); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
my $payload = $frm->get_payload(); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $serialized = $frm->to_bytes(); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
Note that, L, |
30
|
|
|
|
|
|
|
pong messages can have only up to 125 bytes in their payload. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=cut |
33
|
|
|
|
|
|
|
|
34
|
2
|
|
|
2
|
|
747
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
57
|
|
35
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
63
|
|
36
|
|
|
|
|
|
|
|
37
|
2
|
|
|
|
|
11
|
use parent qw( |
38
|
|
|
|
|
|
|
Net::WebSocket::Base::ControlFrame |
39
|
2
|
|
|
2
|
|
15
|
); |
|
2
|
|
|
|
|
5
|
|
40
|
|
|
|
|
|
|
|
41
|
2
|
|
|
2
|
|
153
|
use constant get_opcode => 10; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
243
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub new { |
44
|
4
|
|
|
4
|
0
|
122
|
my ($class, @opts) = @_; |
45
|
|
|
|
|
|
|
|
46
|
4
|
|
|
|
|
21
|
return $class->SUPER::new( @opts, type => 'pong' ); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |