Help for this page

Select Code to Download


  1. or download this
    # $sock is open, probably is a IO::Socket of some type
    
    my $total_read = 0;
    ...
    }
    
    full_process(substr($full_data,0,$total));
    
  2. or download this
    # $data has the required data and $sock is an open socket
    print $sock pack('N',length($data)) . $data . ("\0" x (4-(length($data
    +)%4)));