Add ARM files
[dh-make-perl] / dev / arm / libnet-ssleay-perl / libnet-ssleay-perl-1.35 / debian / libnet-ssleay-perl / usr / lib / perl5 / auto / Net / SSLeay / tcp_read_all.al
1 # NOTE: Derived from blib/lib/Net/SSLeay.pm.
2 # Changes made here will be lost when autosplit is run again.
3 # See AutoSplit.pm.
4 package Net::SSLeay;
5
6 #line 1891 "blib/lib/Net/SSLeay.pm (autosplit into blib/lib/auto/Net/SSLeay/tcp_read_all.al)"
7 sub tcp_read_all {
8     my ($how_much) = @_;
9     $how_much = 2000000000 unless $how_much;
10     my ($n, $got, $errs);
11     my $reply = '';
12
13     my $bsize = 0x10000;
14     while ($how_much > 0) {
15         $n = sysread(SSLCAT_S,$got, (($bsize < $how_much) ? $bsize : $how_much));
16         warn "Read error: $! ($n,$how_much)" unless defined $n;
17         last if !$n;  # EOF
18         $how_much -= $n;
19         debug_read(\$reply, \$got) if $trace>1;
20         $reply .= $got;
21     }
22     return wantarray ? ($reply, $errs) : $reply;
23 }
24
25 # end of Net::SSLeay::tcp_read_all
26 1;