Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Re: socket reading...

by kschwab (Vicar)
on Jul 28, 2001 at 21:28 UTC ( #100574=note: print w/replies, xml ) Need Help??

in reply to Re: socket reading...
in thread socket reading...

I don't agree with this assumption:

When select comes back to you it means that some data is available; it doesn't say how much. Then you try to read 1024 bytes. If there isn't that much data available, and you're in blocking mode, it'll try to wait.

read() and/or sysread() will read whatever is there without waiting on the remainder of the 1024 bytes. They will block if there's no data to read, but select() says there is data.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2021-06-18 22:13 GMT
Find Nodes?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)

    Results (90 votes). Check out past polls.