line |
true |
false |
branch |
70
|
0 |
0 |
unless (defined &$func)
|
73
|
0 |
0 |
unless $pkg =~ s/::[^:]+$//
|
546
|
11 |
6 |
if ($self->{'fh'}) { }
|
|
6 |
0 |
elsif ($self->{'connect'}) { }
|
548
|
0 |
11 |
unless $self->{'fh'}
|
554
|
6 |
0 |
unless exists $self->{'peername'}
|
570
|
6 |
0 |
if ($fh) { }
|
581
|
5 |
1 |
if $self->{'on_connect'}
|
584
|
0 |
0 |
if ($self->{'on_connect_error'}) { }
|
586
|
0 |
0 |
if $self
|
596
|
0 |
6 |
$self->{'on_prepare'} ? :
|
615
|
0 |
17 |
if 1 != unpack('I', $type) and defined $type
|
626
|
0 |
17 |
if $self->{'read_size'} > ($self->{'max_read_size'} || 131072)
|
628
|
10 |
7 |
if $self->{'timeout'}
|
629
|
0 |
17 |
if $self->{'rtimeout'}
|
630
|
0 |
17 |
if $self->{'wtimeout'}
|
632
|
0 |
0 |
if exists $self->{'no_delay'} and $self->{'no_delay'}
|
633
|
0 |
0 |
if exists $self->{'keepalive'} and $self->{'keepalive'}
|
635
|
0 |
17 |
exists $self->{'oobinline'} ? :
|
638
|
10 |
7 |
if $self->{'tls'}
|
640
|
1 |
16 |
if $self->{'on_drain'}
|
643
|
6 |
11 |
if $self->{'on_read'} or @{$self->{'_queue'};}
|
654
|
1 |
0 |
if ($self->{'on_error'}) { }
|
|
0 |
0 |
elsif ($self->{'fh'} or $self->{'connect'}) { }
|
656
|
1 |
0 |
if $fatal
|
727
|
0 |
0 |
if $_[0]{'fh'}
|
743
|
0 |
0 |
if $_[0]{'fh'}
|
760
|
17 |
0 |
if $_[0]{'fh'}
|
841
|
0 |
10 |
unless $new_value >= 0
|
927
|
6 |
7 |
if $cb and $self->{'low_water_mark'} >= length($self->{'wbuf'}) + length($self->{'_tls_wbuf'})
|
944
|
344 |
17 |
if (not $self->{'_ww'} and length $self->{'wbuf'})
|
951
|
344 |
0 |
if (defined $len) { }
|
|
0 |
0 |
elsif ($! != 11 and $! != 4 and $! != 11 and $! != -1e+99) { }
|
958
|
2 |
333 |
if $self->{'low_water_mark'} >= length($self->{'wbuf'}) + length($self->{'_tls_wbuf'}) and $self->{'on_drain'}
|
960
|
343 |
1 |
unless length $self->{'wbuf'}
|
967
|
344 |
0 |
unless $self->{'autocork'}
|
971
|
1 |
343 |
if length $self->{'wbuf'}
|
973
|
0 |
344 |
if (defined $self->{'wbuf_max'} and $self->{'wbuf_max'} < length $self->{'wbuf'})
|
992
|
132 |
142 |
if (@_ > 1)
|
1003
|
262 |
12 |
if ($self->{'tls'}) { }
|
1005
|
258 |
4 |
if $self->{'fh'}
|
1008
|
11 |
1 |
if $self->{'fh'}
|
1112
|
0 |
0 |
unless (eval {
do {
require JSON::XS;
'JSON::XS'->new->utf8
}
})
|
1303
|
306 |
402 |
if $self->{'_skip_drain_rbuf'}
|
1310
|
365 |
421 |
if exists $self->{'_tls_rbuf'}
|
1314
|
635 |
151 |
if (my $cb = shift @{$$self{'_queue'};}) { }
|
|
137 |
14 |
elsif ($self->{'on_read'}) { }
|
1315
|
320 |
315 |
unless (&$cb($self))
|
1319
|
1 |
319 |
if $self->{'_eof'}
|
1325
|
68 |
69 |
unless $len
|
1329
|
0 |
0 |
if ($len == length $self->{'rbuf'} and not @{$self->{'_queue'};} and $self->{'on_read'})
|
1337
|
0 |
0 |
if $self->{'_eof'}
|
1343
|
3 |
11 |
unless $self->{'tls'}
|
1348
|
6 |
395 |
if ($self->{'_eof'})
|
1350
|
6 |
0 |
$self->{'on_eof'} ? :
|
1356
|
0 |
395 |
if (defined $self->{'rbuf_max'} and $self->{'rbuf_max'} < length $self->{'rbuf'})
|
1364
|
6 |
389 |
unless ($self->{'_rw'})
|
1366
|
3 |
3 |
if $self->{'on_read'} or @{$self->{'_queue'};}
|
1385
|
1 |
0 |
if $cb
|
1443
|
217 |
0 |
if (@_)
|
1459
|
99 |
0 |
if (@_)
|
2000
|
15 |
0 |
unless ($self->{'_rw'} or $self->{'_eof'} or not $self->{'fh'})
|
2004
|
298 |
21 |
$self->{'tls'} ? :
|
2007
|
312 |
7 |
if ($len > 0) { }
|
|
7 |
0 |
elsif (defined $len) { }
|
|
0 |
0 |
elsif ($! != 11 and $! != 4 and $! != 11 and $! != -1e+99) { }
|
2010
|
293 |
19 |
if ($self->{'tls'}) { }
|
2018
|
24 |
288 |
if ($len == $self->{'read_size'})
|
2021
|
4 |
20 |
if $self->{'read_size'} > ($self->{'max_read_size'} || 131072)
|
2042
|
0 |
0 |
if $err == Net::SSLeay::ERROR_SYSCALL()
|
2050
|
0 |
0 |
if ($self->{'_on_starttls'}) { }
|
2070
|
10 |
365 |
if (($tmp = Net::SSLeay::write($self->{'tls'}, $self->{'_tls_wbuf'})) <= 0)
|
2073
|
0 |
0 |
if $tmp != $ERROR_WANT_READ and $tmp != $ERROR_SYSCALL || $!
|
2084
|
0 |
365 |
unless (length $tmp)
|
2086
|
0 |
0 |
if $self->{'_on_starttls'}
|
2089
|
0 |
0 |
if ($self->{'on_stoptls'}) { }
|
2101
|
0 |
365 |
unless $self->{'tls'}
|
2105
|
0 |
0 |
if $tmp != $ERROR_WANT_READ and $tmp != $ERROR_SYSCALL || $!
|
2112
|
0 |
333 |
unless $self->{'tls'}
|
2117
|
0 |
561 |
if $self->{'_on_starttls'} and Net::SSLeay::state($self->{'tls'}) == Net::SSLeay::ST_OK()
|
2160
|
0 |
10 |
if $self->{'tls'}
|
2162
|
0 |
10 |
unless (defined $AnyEvent::TLS::VERSION)
|
2163
|
0 |
0 |
unless eval {
do {
require Net::SSLeay;
require AnyEvent::TLS;
1
}
}
|
2171
|
10 |
0 |
if @_ > 2
|
2173
|
0 |
10 |
unless $self->{'fh'}
|
2183
|
0 |
10 |
if ('HASH' eq ref $ctx)
|
2184
|
0 |
0 |
if ($ctx->{'cache'}) { }
|
2221
|
0 |
10 |
if $self->{'on_starttls'}
|
2242
|
0 |
0 |
if ($self->{'tls'} and $self->{'fh'})
|
2256
|
6 |
10 |
unless $self->{'tls'}
|
2259
|
10 |
0 |
if $self->{'tls'} > 0
|
2282
|
0 |
16 |
exists $self->{'linger'} ? :
|
2284
|
1 |
0 |
if ($linger and length $self->{'wbuf'} and $self->{'fh'})
|
2293
|
3 |
1 |
if ($len > 0) { }
|
|
1 |
0 |
elsif (defined $len or $! != 11 and $! != 4 and $! != 11 and $! != -1e+99) { }
|