line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Protocol::SocketIO::Handshake; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
3365
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
64
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
6
|
use overload '""' => sub { $_[0]->to_bytes }, fallback => 1; |
|
1
|
|
|
0
|
|
11
|
|
|
1
|
|
|
|
|
14
|
|
|
0
|
|
|
|
|
0
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
2
|
|
|
2
|
1
|
978
|
my $class = shift; |
10
|
|
|
|
|
|
|
|
11
|
2
|
|
|
|
|
11
|
my $self = bless {@_}, $class; |
12
|
|
|
|
|
|
|
|
13
|
2
|
|
|
|
|
6
|
return $self; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub to_bytes { |
17
|
2
|
|
|
2
|
1
|
16
|
my $self = shift; |
18
|
|
|
|
|
|
|
|
19
|
2
|
|
100
|
|
|
53
|
$self->{transports} |
20
|
|
|
|
|
|
|
||= [qw/websocket flashsocket htmlfile xhr-polling jsonp-polling/]; |
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
|
|
4
|
my $transports = join ',', @{$self->{transports}}; |
|
2
|
|
|
|
|
7
|
|
23
|
|
|
|
|
|
|
|
24
|
2
|
|
|
|
|
5
|
for (qw/session_id heartbeat_timeout close_timeout/) { |
25
|
6
|
50
|
|
|
|
51
|
die "$_ is required" unless defined $self->{$_}; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
2
|
|
|
|
|
17
|
return join ':', $self->{session_id}, $self->{heartbeat_timeout}, |
29
|
|
|
|
|
|
|
$self->{close_timeout}, $transports; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
__END__ |