Help for this page

Select Code to Download


  1. or download this
    sub incoming_data {
        if ($sel->can_read(1)){
        my $input = <$sock>;
        $input =~ s/\r\n//g;
    
  2. or download this
    my $input;
    sysread ($sock, $input, 1024);
    # that will not block gtk2
    print $input;