Hello Dod... Just to be clear about UDP behavior... This only worked because your transmission pattern is based on a single packet exchange. That pattern basically results in a virtual ack/nack process, which orders data by default. UDP is not only unreliable, it is also inherently UNORDERED. So, it is possible that packets could appear out of order, if you were sending multi-packet bursts. This requires you to provide for orderly logic as well. Hence, the queue of some type.
IMHO... If you need orderly, reliable transmissions... use TCP. The speed benefit of UDP is only valuable for single packet exchanges. Otherwise, the robust TCP overhead is much better than anything I can provide instead. Regards... Hoby -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dod Sent: Wednesday, July 02, 2008 5:35 AM To: ICS support mailing Subject: Re: [twsocket] Force UDP source port when sending Hello Angus, ARMSL> No idea how that worked, maybe the client was using a different port to ARMSL> reply. Absolutely, my other programs never needed to re-use same src port so I never got the problem. ARMSL> If you have been making use of the TSocketServer client to save ARMSL> application data for the reply, you'll need a rethink. Perhaps a FIFO ARMSL> queue, I think there's a TList descendent that does that in modern Delphi ARMSL> versions. With UDP there's always a risk of lost packets, if your ARMSL> transmit conflicts with a new received packet, or at least that's my ARMSL> minimal understanding of UDP. UDP packet lost happend as they are sent and without any SYN/ACK dialog between src and dest so UDP is fast but you have to manage packet acknowledge yourself to not loose data. For my application I only receive one packet and send one packet back. regards. -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be