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


Groups > comp.lang.python > #91487

Re: Accessing DataSocket Server with Python

From Marko Rauhamaa <marko@pacujo.net>
Newsgroups comp.lang.python
Subject Re: Accessing DataSocket Server with Python
Date 2015-05-29 20:21 +0300
Organization A noiseless patient Spider
Message-ID <877frrcnaq.fsf@elektro.pacujo.net> (permalink)
References <CAO2fJ-+UjZNqo2yQRRkuSsEJwFAGOnbB9JPCCWX7zX7jt_5POg@mail.gmail.com> <CAGGBd_pEf0E6skDgzVuWLsPEX73OvpTkQ=CwgjKF6Yz+fC6bsw@mail.gmail.com> <mailman.181.1432910260.5151.python-list@python.org> <mka456$iek$1@reader1.panix.com> <mailman.196.1432917609.5151.python-list@python.org>

Show all headers | View raw


Chris Angelico <rosuav@gmail.com>:

> Indeed. That said, though, if your writes are all smaller than one
> packet, and you perfectly alternate a write and a read, a write and a
> read, at both ends, then you can go a very long way without ever
> running into this.

Rare errors are worse than consistent errors.

TCP streams are intercepted by address translators, load balancers,
proxies, protocol translators and what not. They will eagerly take
advantage of the fact that TCP is a full-duplex octet stream.

Also, programs could be plugged into other types of octet stream with
other stream chopping characteristics.

Finally, the MTU size is very unpredictable. You have all kinds of
encapsulation (6to4, VPN, VLAN, tunneling etc) that make it difficult to
be sure about what's a "small" write.

What's more, you should be on the lookout for partial writes not block
until they finish. Typically, it is not enough to rely on TCP's flow
control but also impose a separate application-level, end-to-end flow
control to avoid deadlocks on the one hand and buffer overflows on the
other hand.


Marko

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


Thread

Re: Accessing DataSocket Server with Python William Ray Wing <wrw@mac.com> - 2015-05-29 09:37 -0400
  Re: Accessing DataSocket Server with Python Grant Edwards <invalid@invalid.invalid> - 2015-05-29 16:29 +0000
    Re: Accessing DataSocket Server with Python Chris Angelico <rosuav@gmail.com> - 2015-05-30 02:40 +1000
      Re: Accessing DataSocket Server with Python Grant Edwards <invalid@invalid.invalid> - 2015-05-29 16:59 +0000
      Re: Accessing DataSocket Server with Python Marko Rauhamaa <marko@pacujo.net> - 2015-05-29 20:21 +0300

csiph-web