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


Groups > comp.lang.python > #96907

Re: Lightwight socket IO wrapper

Path csiph.com!usenet.pasdenom.info!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail
Return-Path <cameron@cskk.homeip.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'prefix': 0.07; 'compiler,': 0.16; 'fits': 0.16; 'from:addr:cs': 0.16; 'from:addr:zip.com.au': 0.16; 'from:name:cameron simpson': 0.16; 'guarentee': 0.16; 'message-id:@cskk.homeip.net': 0.16; 'received:211.29': 0.16; 'received:211.29.132': 0.16; 'received:cskk.homeip.net': 0.16; 'received:homeip.net': 0.16; 'received:optusnet.com.au': 0.16; 'received:syd.optusnet.com.au': 0.16; 'sequencing': 0.16; 'simpson': 0.16; 'tcp': 0.16; 'udp,': 0.16; 'wrote:': 0.16; 'to:name:python-list@python.org': 0.20; 'do.': 0.22; 'cheers,': 0.22; '(or': 0.23; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'chris': 0.26; 'another': 0.32; 'received:com.au': 0.33; 'add': 0.34; 'but': 0.36; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'data': 0.39; 'to:addr:python.org': 0.40; 'care': 0.60; 'your': 0.60; 'different': 0.63; 'face': 0.64; 'cameron': 0.66; '>if': 0.84
Date Mon, 21 Sep 2015 11:55:14 +1000
From Cameron Simpson <cs@zip.com.au>
To "python-list@python.org" <python-list@python.org>
Subject Re: Lightwight socket IO wrapper
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii; format=flowed
Content-Disposition inline
In-Reply-To <CAPTjJmpLyuy==kY4hj11pGkRedhBS5vevitmzeDvwz8rQpSSag@mail.gmail.com>
User-Agent Mutt/1.5.23 (2014-03-12)
References <CAPTjJmpLyuy==kY4hj11pGkRedhBS5vevitmzeDvwz8rQpSSag@mail.gmail.com>
X-Optus-CM-Score 0
X-Optus-CM-Analysis v=2.1 cv=Xd90t9N5 c=1 sm=1 tr=0 a=t6IGaf1l19PsElHJfDn/BA==:117 a=t6IGaf1l19PsElHJfDn/BA==:17 a=ZtCCktOnAAAA:8 a=PO7r1zJSAAAA:8 a=vrnE16BAAAAA:8 a=kj9zAlcOel0A:10 a=ff-B7xzCdYMA:10 a=pGLkceISAAAA:8 a=_0dsxPLgK63WtyjSPW4A:9 a=IU4GLvOlykxKAOMQ:21 a=iXT4-84l7ymxzGxf:21 a=CjuIK1q_8ugA:10
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.16.1442801735.28679.python-list@python.org> (permalink)
Lines 19
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1442801735 news.xs4all.nl 23771 [2001:888:2000:d::a6]:39878
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:96907

Show key headers only | 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