line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::WebSocket::Frame::ping; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=encoding utf-8 |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
Net::WebSocket::Frame:ping: |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my $frm = Net::WebSocket::Frame::ping->new( |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
#Optional, can be either empty (default) or four random bytes |
14
|
|
|
|
|
|
|
mask => q<>, |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
payload => $payload, |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
$frm->get_type(); #"ping" |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
$frm->is_control(); #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
|
|
|
|
|
|
|
ping messages can have only up to 125 bytes in their payload. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=cut |
33
|
|
|
|
|
|
|
|
34
|
11
|
|
|
11
|
|
1645
|
use strict; |
|
11
|
|
|
|
|
23
|
|
|
11
|
|
|
|
|
331
|
|
35
|
11
|
|
|
11
|
|
58
|
use warnings; |
|
11
|
|
|
|
|
26
|
|
|
11
|
|
|
|
|
394
|
|
36
|
|
|
|
|
|
|
|
37
|
11
|
|
|
|
|
83
|
use parent qw( |
38
|
|
|
|
|
|
|
Net::WebSocket::Base::ControlFrame |
39
|
11
|
|
|
11
|
|
72
|
); |
|
11
|
|
|
|
|
23
|
|
40
|
|
|
|
|
|
|
|
41
|
11
|
|
|
11
|
|
885
|
use constant get_opcode => 9; |
|
11
|
|
|
|
|
31
|
|
|
11
|
|
|
|
|
758
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |