Re: TCP question



"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

--
Reply to the group so all can participate
VB.Net: "Fool me once..."

.



Relevant Pages

  • Re: TCP question
    ... It's a stream. ... by its nature it behaves more like a stream at the TCP level. ... the code you have for receiving the packets ... Consecutive packets can even take different routes from sender ...
    (microsoft.public.vb.general.discussion)
  • Re: Fundamentals question, is this how it works?
    ... If i let it run at full speed it gets stuck. ... TCP is a stream-based protocol, which means that it ignores any attempt (on ... then the receiving side might get ... all 2048 bytes in one call to recv(), or it might need many calls to recv ...
    (microsoft.public.win32.programmer.networks)
  • Re: BeginReceive return zero length buffer when run ,and work correctly when use step by step debug
    ... Your first read is receiving 0 bytes? ... Your async socket listens and receives 500 bytes (your total buffer size ... But the data remains on the socket, until such time as it IS ... With a stream-oriented socket (eg TCP), ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: send & MSG_DONTWAIT
    ... TCP transport and neither has the receiving application. ... That's why an "all or nothing" non-blocking send doesn't exist. ... the last 'complete frame' has been received and then, ...
    (comp.unix.programmer)
  • Re: The best way to wait for something to happen
    ... The Winsock Control has a "ConnectionRequest" Event which is what the sample ... I'm still a little hazy on how to do this with TCP. ... TCP does not require a client and a server any more than UDP does. ... the receiving workstation will receive all of the data but ...
    (microsoft.public.fox.programmer.exchange)

Loading