home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / programm / 4507 < prev    next >
Encoding:
Text File  |  1992-08-31  |  1.7 KB  |  42 lines

  1. Newsgroups: comp.unix.programmer
  2. Path: sparky!uunet!cs.utexas.edu!csc.ti.com!tilde.csc.ti.com!fstop.csc.ti.com!pioneer!fcw
  3. From: fcw@telecom.ti.com (Fred Wedemeier)
  4. Subject: Sending "datagrams" on a connected socket.
  5. Message-ID: <1992Sep1.061951.6750@csc.ti.com>
  6. Sender: usenet@csc.ti.com
  7. Nntp-Posting-Host: pioneer
  8. Reply-To: fcw@telecom.ti.com
  9. Organization: TI Telecom Systems, Dallas
  10. Date: Tue, 1 Sep 1992 06:19:51 GMT
  11. Lines: 29
  12.  
  13. I've RTFM'd sections (2) and (4) of the UNIX manual, hammered out some
  14. test code, and still can't figure out how to do the following:
  15.  
  16. I need two processes to talk to each other in a "reliable,
  17. flow-controlled, in-order, two-way" manner, quoting tcp(4). These
  18. processes need to exchange discrete messages rather than boundary-less
  19. streams of bytes.
  20.  
  21. I've tried a number of things with SOCK_STREAMs and send()/recv(), all
  22. of which which concatenate messages if the receiving process isn't
  23. waiting when each message arrives. For example, if I send() a message
  24. "hello" followed by a message "goodbye" and then recv() at the other
  25. end, what I get is "hellogoodbye" rather than a "hello" and a
  26. "goodbye."
  27.  
  28. It appears that features of both SOCK_STREAMs and SOCK_DGRAMs are
  29. needed. Or more likely a SOCK_SEQPACKET, which according to socket(2)
  30. is "presently not implemented for any protocol family."
  31.  
  32. I can add a layer onto a stream or datagram socket, but it would be
  33. nice if some incantation of socket library calls can do it instead.
  34. Email or net help would be appreciated... Either suggestions how to do
  35. it or a knowledgeable statement that it ain't possible.
  36.  
  37. thx.
  38. ---
  39. Fred Wedemeier    pho: 214-997-3213     fax: 214-997-3639
  40.                 timsg: fcw             inet: fcw@pioneer.telecom.ti.com
  41.  
  42.