Greg wrote:
> > Meaningless question TCP is a stream not message based
> 
> Try http://www.linuxdoc.org/LDP/tlk/tlk.html
> and then follow the link to the chapter on networking.
> 
> I got the distinct impression that TCP uses packets and that these packets
> are sent using IP ie. TCP packets get embedded in IP packets. If you're
> using ethernet then the NIC driver embeds the IP packet in an ethernet
> packet and transmits.
> Lots of packets.
> Not a lot of streams.
> What would I know, don't even have a beard.

TCP does use packets, and they are indeed one kind of IP packets.

But the application sees streams.  Every TCP connection is a single
bidirectional stream.  You send you data, it arrives at the other end.
There is no guarantee that the size you write() at one end will be the
size returned by read() at the other -- the only guarantee is that the
sequence of data is preserved.

So you can write as much or as little as you like, and it will
eventually arrive at the other end.

Stream data isn't lost lost or reordered even if packets are -- TCP
handles that automatically.  Though, a connection as a whole may be lost
if there is a severe problem.

enjoy,
-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to