Help for this page

Select Code to Download


  1. or download this
    my $sec = 3;
    $SIG{ALRM} = sub {
    ...
    alarm($sec);
    $MySocket->recv ($text,1000);
    alarm(0);
    
  2. or download this
    {
        local $SIG{ALRM} = sub { ...};
    ...
        $MySocket->recv ($text,1000);
        alarm(0);
    }