[newbie] trying socket as a replacement for nc

Chris Angelico rosuav at gmail.com
Thu Dec 12 09:23:34 EST 2013


On Fri, Dec 13, 2013 at 1:16 AM, Grant Edwards <invalid at invalid.invalid> wrote:
> And it _will_ fail someday in some odd circumstance when, for example,
> some customer is be using it via a dial-up PPP connection, or there is
> a satellite link in the path, or there's a flakey router somewhere,
> or...

Or you write, write, write in quick succession. Nagle's Algorithm
means that if the first one hasn't yet been acknowledged, the second
one will be delayed, which means it'll probably be combined with the
third and sent when the first one's ACK comes through. Stream sockets
guarantee a stream of bytes; datagram sockets guarantee datagrams.
Weird how that goes, isn't it?

ChrisA



More information about the Python-list mailing list