in reply to Non blocking read on a filehandle

Here's something I've started throwing together.. might as well post it here to get the feedback from it and get it all corrected for my use and for your use.(question marks mean I'm unsure on these)
UPDATED!!
Function Read/Write? Blocking? Buffering?
send WRITE Yes Yes
recv READ Yes Yes
print WRITE Yes Yes
read READ Yes Yes
syswrite WRITE Yes No
sysread READ Yes No
<FILEHANDLE> READ Yes Yes


I think that blocking also depends on the flags set on the file handle.. like I said, this is probly all wrong, but it would be nice for someone to correct me and it could prove useful for perl programmers met with the frustration I've experienced trying to understand socket/file I/O ;)

-brad..
  • Comment on Re: (reyjrar) Non blocking read on a filehandle

Replies are listed 'Best First'.
(tye)Re: Non blocking read on a filehandle
by tye (Sage) on Jan 31, 2001 at 00:27 UTC

    Your color select sucks when viewed with my color scheme. Please don't use color.

    The "Blocking?" field should be "Yes" for all seven items (even the ones you have marked as "No"). Under "Buffering?", the two "No (?)"s should be "Yes"s.

            - tye (but my friends call me "Tye")
Re: Re: (reyjrar)Non blocking read on a filehandle
by AgentM (Curate) on Jan 31, 2001 at 00:29 UTC
    Pretty much everything you have there is buffered in some way or another. Don't forget that you can turn this off using $. It's also worth mentioning that's its a bad idea to use send or recv on a filehandle. :-D For syswrite and sysread, buffering is also optional.
    AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.

      sysread and syswrite are not buffered, other than that the operating system might buffer things such that what you syswrite() might not be flushed to disk immediately. But it will be visible to other processes immediately.

              - tye (but my friends call me "Tye")