line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Protocol::SPDY::Frame::Control::SYN_REPLY; |
2
|
|
|
|
|
|
|
{ |
3
|
|
|
|
|
|
|
$Protocol::SPDY::Frame::Control::SYN_REPLY::VERSION = '1.000'; |
4
|
|
|
|
|
|
|
} |
5
|
3
|
|
|
3
|
|
17
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
108
|
|
6
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
96
|
|
7
|
3
|
|
|
3
|
|
15
|
use parent qw(Protocol::SPDY::Frame::HeaderSupport Protocol::SPDY::Frame::Control); |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
18
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Protocol::SPDY::Frame::Control::SYN_REPLY - response to a SYN_STREAM |
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
|
|
225
|
use Protocol::SPDY::Constants ':all'; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
3174
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head2 type_name |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
The string type for this frame ('SYN_REPLY'). |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=cut |
32
|
|
|
|
|
|
|
|
33
|
33
|
|
|
33
|
1
|
143
|
sub type_name { 'SYN_REPLY' } |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head2 new |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Instantiate. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub new { |
42
|
14
|
|
|
14
|
1
|
22
|
my $class = shift; |
43
|
14
|
|
|
|
|
63
|
my %args = @_; |
44
|
14
|
50
|
50
|
|
|
64
|
$args{headers} = $class->header_hashref_to_arrayref($args{headers}) if (ref($args{headers}) || '') eq 'HASH'; |
45
|
14
|
|
|
|
|
100
|
$class->SUPER::new(%args) |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head2 from_data |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Instantiate from the given data. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=cut |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub from_data { |
55
|
8
|
|
|
8
|
1
|
18
|
my $class = shift; |
56
|
8
|
|
|
|
|
30
|
my %args = @_; |
57
|
8
|
|
|
|
|
36
|
my ($stream_id) = unpack "N1", substr $args{data}, 0, 4, ''; |
58
|
8
|
|
|
|
|
14
|
$stream_id &= ~0x80000000; |
59
|
8
|
|
|
|
|
21
|
my $zlib = delete $args{zlib}; |
60
|
8
|
|
|
|
|
35
|
my $out = $zlib->decompress($args{data}); |
61
|
8
|
|
|
|
|
73
|
my ($headers) = $class->extract_headers($out); |
62
|
8
|
|
|
|
|
42
|
$class->new( |
63
|
|
|
|
|
|
|
%args, |
64
|
|
|
|
|
|
|
stream_id => $stream_id, |
65
|
|
|
|
|
|
|
headers => $headers, |
66
|
|
|
|
|
|
|
); |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head2 stream_id |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
The stream ID we're responding to. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=cut |
74
|
|
|
|
|
|
|
|
75
|
15
|
|
|
15
|
1
|
2433
|
sub stream_id { shift->{stream_id} } |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head2 as_packet |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Returns the packet as a byte string. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=cut |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
sub as_packet { |
84
|
7
|
|
|
7
|
1
|
14
|
my $self = shift; |
85
|
7
|
|
|
|
|
13
|
my $zlib = shift; |
86
|
7
|
|
|
|
|
28
|
my $payload = pack 'N1', $self->stream_id & 0x7FFFFFFF; |
87
|
7
|
|
|
|
|
15
|
my $block = $self->pairs_to_nv_header(map {; $_->[0], join "\0", @{$_}[1..$#$_] } @{$self->headers}); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
21
|
|
|
7
|
|
|
|
|
55
|
|
88
|
7
|
|
|
|
|
38
|
$payload .= $zlib->compress($block); |
89
|
7
|
|
|
|
|
50
|
return $self->SUPER::as_packet( |
90
|
|
|
|
|
|
|
payload => $payload, |
91
|
|
|
|
|
|
|
); |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head2 to_string |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
String representation, for debugging. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=cut |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
sub to_string { |
101
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
102
|
0
|
|
|
|
|
|
$self->SUPER::to_string . ', ' . $self->header_line; |
103
|
|
|
|
|
|
|
} |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
1; |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
__END__ |