in reply to How do I do a non-blocking accept?
(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.
|
|---|