my $d = protocol_read_bytes \*STDIN, $1;
print PF $d or die $!;
}
+ printdebug "received into $ourfn\n";
}
#---------- remote protocol support, responder ----------
sub responder_send_file ($$) {
my ($keyword, $ourfn) = @_;
return unless $we_are_responder;
+ printdebug "[[ $keyword $ourfn\n";
responder_send_command "file $keyword";
protocol_send_file \*STDOUT, $ourfn;
}
sub responder_receive_files ($@) {
my ($keyword, @ourfns) = @_;
die unless $we_are_responder;
+ printdebug "]] $keyword @ourfns\n";
responder_send_command "want $keyword";
foreach my $fn (@ourfns) {
protocol_receive_file \*STDIN, $fn;
my ($keyword) = @_;
die "$keyword ?" if $i_wanted{$keyword}++;
my @localpaths = i_method "i_want", $keyword;
+ printdebug "]] $keyword @localpaths\n";
foreach my $localpath (@localpaths) {
protocol_send_file \*RI, $localpath;
}