Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #96907

Re: Lightwight socket IO wrapper

Date 2015-09-21 11:55 +1000
From Cameron Simpson <cs@zip.com.au>
Subject Re: Lightwight socket IO wrapper
References <CAPTjJmpLyuy==kY4hj11pGkRedhBS5vevitmzeDvwz8rQpSSag@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.16.1442801735.28679.python-list@python.org> (permalink)

Show all headers | View raw


On 21Sep2015 10:34, Chris Angelico <rosuav@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 <cs@zip.com.au>

If you lie to the compiler, it will get its revenge.    - Henry Spencer

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: Lightwight socket IO wrapper Cameron Simpson <cs@zip.com.au> - 2015-09-21 11:55 +1000
  Re: Lightwight socket IO wrapper Jorgen Grahn <grahn+nntp@snipabacken.se> - 2015-09-22 07:47 +0000

csiph-web