[En-Nut-Discussion] Timing and Receiving Data Problem for TCPServer

Jose Vicente Sanchez Ortega jvsanchezo at gmail.com
Fri Feb 2 11:19:08 CET 2007


Hi, Clemens:

I totally agree with you. There's no relationship between the way the bytes
are grouped on the output stream and the way they are received on the input
stream. Any way, it looked to me that John was saying that the order of the
bytes on both input and output streams could be different and that was which
I didn't agree.

Thanks and regards.


Jose Vicente.



On 02/02/07, Clemens Kirchgatterer <c.kirchgatterer at amatic.com> wrote:
>
> On Thu, 2007-02-01 at 16:37 +0100, Jose Vicente Sanchez Ortega wrote:
>
> > Believe me. TCP ensures that packets are delivered on the same order
> that
> > they went sent.
>
> maybe one thing that adds to the confusion is, like you correctly
> pointed out, that TCP is a stream and not a packet oriented protocol to
> begin with. so to clear this up: using tcp you can be sure, that you get
> all your data, without corruption and in the right order. on the other
> hand, you must check for message boundaries on the application level.
> i.e. if you put first 3 bytes on the wire and then 5, you may get all 8
> bytes in one read() on the receiver side, or 2 times 4 bytes or any
> other combination that sums up to 8. :-)
>
> best regards ...
> clemens
>
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>



More information about the En-Nut-Discussion mailing list