Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2016-08-30 05:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (411 votes). Check out past polls.