1 # NOTE: Derived from blib/lib/Net/SSLeay.pm.
2 # Changes made here will be lost when autosplit is run again.
6 #line 1939 "blib/lib/Net/SSLeay.pm (autosplit into blib/lib/auto/Net/SSLeay/tcp_write_all.al)"
14 my ($wrote, $written, $to_write) = (0,0, blength($$data_ref));
15 my $vm = $trace>2 && $linux_debug ?
16 (split ' ', `cat /proc/$$/stat`)[22] : 'vm_unknown';
17 warn " write_all VM at entry=$vm to_write=$to_write\n" if $trace>2;
19 warn "partial `$$data_ref'\n" if $trace>3;
20 $wrote = syswrite(SSLCAT_S, $$data_ref, $to_write, $written);
21 if (defined $wrote && ($wrote > 0)) { # write_partial can return -1
24 } elsif (!defined($wrote)) {
25 warn "tcp_write_all: $!";
26 return (wantarray ? (undef, "$!") : undef);
28 $vm = $trace>2 && $linux_debug ?
29 (split ' ', `cat /proc/$$/stat`)[22] : 'vm_unknown';
30 warn " written so far $wrote:$written bytes (VM=$vm)\n" if $trace>2;
32 return wantarray ? ($written, '') : $written;
35 # end of Net::SSLeay::tcp_write_all