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