Lightwight socket IO wrapper

James Harris james.harris.1 at gmail.com
Tue Sep 22 23:28:41 CEST 2015


"Marko Rauhamaa" <marko at pacujo.net> wrote in message 
news:8737y6cgp6.fsf at elektro.pacujo.net...
> "James Harris" <james.harris.1 at gmail.com>:
>
>> I agree with what you say. A zero-length UDP datagram should be
>> possible and not indicate end of input but is that guaranteed and
>> portable?
>
> The zero-length payload size shouldn't be an issue, but UDP doesn't 
> make
> any guarantees about delivering the message. Your UDP application must
> be prepared for some, most or all of the messages disappearing without
> any error indication.
>
> In practice, you'd end up implementing your own TCP on top of UDP
> (retries, timeouts, acknowledgements, sequence numbers etc).

The unreliability of UDP was not the case in point here. Rather, it was 
about whether different platforms could be relied upon to deliver 
zero-length datagrams to the app if the datagrams got safely across the 
network.

James



More information about the Python-list mailing list