Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Using select() on only one socket

by Anonymous Monk
on Sep 04, 2005 at 15:20 UTC ( #489056=note: print w/replies, xml ) Need Help??

in reply to Using select() on only one socket

I see you solved your problem, but thought I'd mention this anyway since so few people realize it.

When select() says a file descriptor is readable it really means that it *might* be readable. You still have to use nonblocking I/O to be sure you won't block.

Replies are listed 'Best First'.
Re^2: Using select() on only one socket
by polettix (Vicar) on Sep 04, 2005 at 16:31 UTC
    This is not correct: the whole point of can_read is that it tells you that there's data waiting to be read in the filehandles it returns. Probably you're referring to some particular environment or operating system I'm not considering at the moment?

    perl -ple'$_=reverse' <<<ti.xittelop@oivalf

    Don't fool yourself.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2021-01-25 01:24 GMT
Find Nodes?
    Voting Booth?