Help for this page

Select Code to Download


  1. or download this
    my %clients :shared;
    while( my $client = $server->accept;
    ...
    my $fileno = $clients{ client };
    open $client, "+<&$fileno" or die ... ## dup() the the glob from the f
    +ileno
    ## use $client
    
  2. or download this
    while( my $client = $server->accept ) {
        async{
    ...
            }
        }->detach;
    }