home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / internal / 1575 < prev    next >
Encoding:
Internet Message Format  |  1992-07-21  |  1.0 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!wupost!usc!rpi!crdgw1!rdsunx.crd.ge.com!rodson!bloomer
  2. From: bloomer@rodson.crd.ge.com (John Bloomer)
  3. Newsgroups: comp.unix.internals
  4. Subject: recv() vs. read() (and send() vs. write())
  5. Keywords: socket buffering
  6. Message-ID: <1992Jul21.213133.23400@crd.ge.com>
  7. Date: 21 Jul 92 21:31:33 GMT
  8. Sender: usenet@crd.ge.com (Required for NNTP)
  9. Organization: GE Corporate R&D Center
  10. Lines: 14
  11. Nntp-Posting-Host: rodson.crd.ge.com
  12.  
  13. If I interpret published unix internals books and manual pages
  14. correctly, it is possible to peek at the data waiting at a socket -
  15. using the MSG_PEEK flag.
  16.  
  17. While a read() will return with whatever it has found available at a
  18. socket, does a recv() do the same, or does it peek to make sure the
  19. whole len message is available?
  20.  
  21. I believe the same general question applies to send() vs. write().
  22. Some guidance would be appreciated.
  23. -- 
  24. John J. Bloomer 518-387-6964 (dialcomm 833) FAX -7332
  25. KWC317, General Electric Corporate Research and Development
  26. PO Box 8, Schenectady NY 12301
  27.