home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2005 March / PCWELT_3_2005.ISO / pcwsoft / framework-2.2.exe / ssl_read_all.al < prev    next >
Encoding:
Text File  |  2004-02-17  |  703 b   |  26 lines

  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 1515 "blib/lib/Net/SSLeay.pm (autosplit into blib/lib/auto/Net/SSLeay/ssl_read_all.al)"
  7. sub ssl_read_all {
  8.     my ($ssl,$how_much) = @_;
  9.     $how_much = 2000000000 unless $how_much;
  10.     my ($got, $errs);
  11.     my $reply = '';
  12.  
  13.     while ($how_much > 0) {
  14.     $got = Net::SSLeay::read($ssl,$how_much);
  15.     last if $errs = print_errs('SSL_read');
  16.     $how_much -= blength($got);
  17.     debug_read(\$reply, \$got) if $trace>1;
  18.     last if $got eq '';  # EOF
  19.     $reply .= $got;
  20.     }
  21.     return wantarray ? ($reply, $errs) : $reply;
  22. }
  23.  
  24. # end of Net::SSLeay::ssl_read_all
  25. 1;
  26.