Re: TCP question
- From: David Kerber <ns_dkerber@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 20 Nov 2006 08:25:25 -0500
In article <eOhre6mCHHA.472@xxxxxxxxxxxxxxxxxxxx>, tiredofit@xxxxxxxxxxx
says...
"fniles" <fniles@xxxxxxxxxx> wrote in message
news:uPBYv0mCHHA.5012@xxxxxxxxxxxxxxxxxxxx
I am using TCP control in VB6. I am sending a lot of messages every
milli seconds.
Sometimes (not very often) the messages received will be out of
order, and they are NOT received one after another. In between the
message, there are other messages.
Like the following example:
ABC,140425,140450,139800,LAST|
39850,,LAST| -->> incomplete and out of order, it should be after
the message below
ABC,140415,140440,139700,,LAST|
ABC,140430,140455,139815,,LAST|
ABC,140445,140470,139820,,LAST|
ABC,140425,140450,1 -->> incomplete and out of order, it should be
before the message above
Message "ABC,140425,140450,1" should appear before and be together
with "40125,,LAST| "
So, it should be "ABC,140425,140450,139850,,LAST|".
Is this how TCP works ?
No, TCP guarantees that the data is received in the order it is sent. Show
the code you have for receiving the packets
No, it does not guarantee the order; just that they will be received
intact. Consecutive packets can even take different routes from sender
to receiver, which can easily change the receipt order. If one is lost
or damaged en route, it will request a resend of that particular packet,
and that can change the order as well.
I think the only time you can expect the order to be correct is if there
are no routers between the source and the destination, and I'm not even
sure if it's guaranteed even then.
--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
.
- Follow-Ups:
- Re: TCP question
- From: Dan Barclay
- Re: TCP question
- From: Bob O`Bob
- Re: TCP question
- From: Bob Butler
- Re: TCP question
- References:
- TCP question
- From: fniles
- Re: TCP question
- From: Bob Butler
- TCP question
- Prev by Date: Re: porblem about vb.net and mysql connection
- Next by Date: Re: Calling .NET assembly from VB6 program
- Previous by thread: Re: TCP question
- Next by thread: Re: TCP question
- Index(es):
Relevant Pages
|
Loading