/[Sack]/trunk/bin/sack.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/bin/sack.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 56 by dpavlin, Fri Sep 25 10:05:45 2009 UTC revision 58 by dpavlin, Fri Sep 25 12:24:19 2009 UTC
# Line 126  sub get_node { Line 126  sub get_node {
126                  return;                  return;
127          }          }
128          chomp( my $size = <$sock> );          chomp( my $size = <$sock> );
129          warn "[$port] <<<< $node $size bytes\n";          warn "[$port] <<<< $node $size bytes\n" if $debug || $size > 1024;
130          my $data;          my $data;
131          read $sock, $data, $size;          read $sock, $data, $size;
132          return $data;          return $data;
# Line 135  sub get_node { Line 135  sub get_node {
135  sub send_sock {  sub send_sock {
136          my ( $sock, $data ) = @_;          my ( $sock, $data ) = @_;
137          my $size   = length $data;          my $size   = length $data;
138          warn "[$port] >>>> ", $sock->peerhost, " $size bytes\n";          warn "[$port] >>>> $size bytes\n" if $debug || $size > 1024;
139          print $sock "$size\n$data" || warn "can't send $size bytes to ", $sock->peerhost;          print $sock "$size\n$data" || warn "can't send $size bytes to ", $sock->peerhost;
140  }  }
141    

Legend:
Removed from v.56  
changed lines
  Added in v.58

  ViewVC Help
Powered by ViewVC 1.1.26