line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Protocol::SPDY::Frame::Control::PING; |
2
|
|
|
|
|
|
|
{ |
3
|
|
|
|
|
|
|
$Protocol::SPDY::Frame::Control::PING::VERSION = '1.000'; |
4
|
|
|
|
|
|
|
} |
5
|
3
|
|
|
3
|
|
15
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
98
|
|
6
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
107
|
|
7
|
3
|
|
|
3
|
|
15
|
use parent qw(Protocol::SPDY::Frame::Control); |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
16
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Protocol::SPDY::Frame::Control::PING - aliveness test |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 VERSION |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
version 1.000 |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 SYNOPSIS |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 DESCRIPTION |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
See L and L. |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=cut |
24
|
|
|
|
|
|
|
|
25
|
3
|
|
|
3
|
|
168
|
use Protocol::SPDY::Constants ':all'; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
1439
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head2 type_name |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
The string type for this frame ('PING'). |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=cut |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
0
|
1
|
|
sub type_name { 'PING' } |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head2 id |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
The unique ping ID. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub id { |
42
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
43
|
0
|
0
|
|
|
|
|
return $self->{id} unless @_; |
44
|
0
|
|
|
|
|
|
$self->{id} = shift; |
45
|
0
|
|
|
|
|
|
return $self; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head2 from_data |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Instantiate from the given data. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=cut |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub from_data { |
55
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
56
|
0
|
|
|
|
|
|
my %args = @_; |
57
|
0
|
|
|
|
|
|
my ($id) = unpack "N1", substr $args{data}, 0, 4, ''; |
58
|
0
|
|
|
|
|
|
$class->new( |
59
|
|
|
|
|
|
|
%args, |
60
|
|
|
|
|
|
|
id => $id, |
61
|
|
|
|
|
|
|
); |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 as_packet |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Returns the packet as a byte string. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
sub as_packet { |
71
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
72
|
0
|
|
|
|
|
|
my $payload = pack 'N1', $self->id; |
73
|
0
|
|
|
|
|
|
return $self->SUPER::as_packet( |
74
|
|
|
|
|
|
|
payload => $payload, |
75
|
|
|
|
|
|
|
); |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head2 to_string |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
String representation, for debugging. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=cut |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
sub to_string { |
85
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
86
|
0
|
|
|
|
|
|
$self->SUPER::to_string . ', id ' . $self->id; |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
1; |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
__END__ |