home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.protocols.tcp-ip
- Path: sparky!uunet!caen!sdd.hp.com!apollo.hp.com!netnews
- From: sommerfeld@apollo.hp.com (Bill Sommerfeld)
- Subject: Re: TCP reliability
- Sender: usenet@apollo.hp.com (Usenet News)
- Message-ID: <SOMMERFELD.92Sep4151357@gourmet.apollo.hp.com>
- In-Reply-To: droux@hei.unige.ch's message of 4 Sep 92 16:24:58 +0200
- Date: Fri, 4 Sep 1992 19:13:01 GMT
- Lines: 37
- References: <1992Sep4.162458.1@hei.unige.ch>
- Nntp-Posting-Host: gourmet.ch.apollo.hp.com
- Organization: Hewlett Packard
-
- In article <1992Sep4.162458.1@hei.unige.ch> droux@hei.unige.ch writes:
-
- These two entities are communicating through AF_INET family
- sockets of SOCK_STREAM type. Our Problem is, that a receiver implemented on
- a NeXT receives much more packets than the sender implemented on
- a Sun workstation sends (1.3 : 1).
-
- The data exchange is made by normal read() and write() calls followed by an
- acknowledgement. We transmitt packets of 5000 bytes of unstructered data.
- If a sender send 300 packets (as a concrete example) the receiver receives
- over 400 packets and about 120 of them are invalid. We consider this as a
- serious problem since our system is based on realibility of TCP sockets.
- Is there a special option on sockets or another method to avoid these
- problems?
-
- No, you have a fundamental misunderstanding about TCP.
-
- TCP is byte oriented, not "record" or "packet" oriented.
-
- With sockets, when you do a read() on a TCP socket, your process
- either blocks until something is available, or returns immediately
- having read the data immediately available (or a prefix of it, if you
- passed a buffer shorter than the amount queued for read).
-
- If you want to do record-oriented things over TCP, you have to define
- your own record boundaries (e.g., with a byte count followed by the
- bytes), and count carefully on the receive end.
-
- - Bill
-
-
-
-
-
-
-
-
-