On 21Sep2015 10:34, Chris Angelico <ros...@gmail.com> wrote:
If you're going to add sequencing and acknowledgements to UDP,
wouldn't it be easier to use TCP and simply prefix every message with
a two-byte length?

Frankly, often yes. That's what I do. (different length encoding, but otherwise...)

UDP's neat if you do not care if a packet fails to arrive and if you can guarentee that your data fits in a packet in the face of different MTUs. I like TCP myself, most of the time. Another nice thing about TCP is that wil a little effort you get to pack multiple data packets (or partial data packets) into a network packet, etc.

Cheers,
Cameron Simpson <c...@zip.com.au>

If you lie to the compiler, it will get its revenge.    - Henry Spencer
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to