AFAIK, TCP/IP should enforce the sequence in which data is received by your
listener.
It certainly seems to do this ok on my TCP/IP listener. However, it depends
what you mean by "packets".
In my app, I send anything up to 1mb files from a sender on one machine
(PC) to a receiver on another machine (which is running another operating
system, no less), and vice versa.
I use
Socket.SendStream( FileStream ); {send file}
where the FileStream is linked to a file.
After that, the TCP/IP socket components take over. At the other end
there's a little more messing around because the socket receiver doesn't
get everything in one hit (it's event driven, and the TCP/IP buffer
releases its data in bursts, but the data always seems to arrive in order
(presumably because TCP/IP is rearranging things before releasing the data
to the "buffer").
Cheers,
Simon Mahony
System Creator,
MetService
-----Original Message-----
From: Peter Harrison IT [SMTP:[EMAIL PROTECTED]]
Sent: Tuesday, July 13, 1999 1:37 PM
To: Multiple recipients of list delphi
Subject: [DUG]: TCP/IP Question
I am writing a TCP/IP Server.
I am using WinSock.
The client transmits several packets, and I was expecting the packets to
arrive on the server in the same order. They don't appear to be arriving
in
the same order they left - which is what I thought TCP/IP gives you.
Am I mistaken (and there is a bug in my program), or does TCP/IP not
actually enforce the order of arrival of packets?
Peter Harrison
Software Developer
Sovereign
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz