Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: How do I do a non-blocking accept?

by davidnicol (Acolyte)
on Aug 23, 2004 at 01:46 UTC ( #384997=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      foreach (@Listeners){
       vec($rout,fileno($_),1) or next;
    ...
       while (accept(my $NewServer, $_)){
          push @Clients, $NewServer
          
    
  2. or download this
      foreach (@Listeners){
       vec($rout,fileno($_),1) or next;
    ...
          push @Clients, $NewServer
       }else{ log "accept: $!" }
          
    
  3. or download this
      foreach (@Listeners){
       vec($rout,fileno($_),1) or next;
    ...
       select($rvec,undef,undef,0);
       vec($rvec,fileno($_),1) and goto acc;
          
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://384997]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2014-12-27 05:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls