Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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

by Anonymous Monk
on Nov 07, 2001 at 14:32 UTC ( #123792=note: print w/replies, xml ) Need Help??


in reply to How do I do a non-blocking accept?

THIS WORKS!!!!

(Tested on Win32 with indigo and activestate perl)

vec($bits1,fileno($server),1)=1;
while(1) {
 $rc=select($rout1=$bits1,$wout1=$bits1,$eout1=$bits1,0.5); # poll
 print "select($rout1,$wout1,$eout1,0)=$rc\n";
}

When there's a connection, $rout1 gets set.