[newbie] trying socket as a replacement for nc
88888 Dihedral
dihedral88888 at gmail.com
Thu Dec 19 02:20:17 EST 2013
> 88888 Dihedral <dihedral88888 at gmail.com> wrote:
>
>
>
> > It is trivial to use UDP with
>
> > forward error correction such as
>
> > the CD in 1982.
>
>
>
> CD uses Reed-Solomon coding, which is great for correcting the types of
>
> errors expected on a CD. Namely, bursts of bit errors caused by
>
> localized failure of the optical coating, scratches, dirt, etc. It
>
Don't you interleave your bytes of data
first before forming several UDP
packets to send to the receiver?
If a whole packet is lost or
timed out, then just mark missed bytes
in the missed UDP as erasures.
> wouldn't be hard to build something like that on top of UDP, but those
>
> sorts of errors are not what you typically see in networks.
>
>
>
> It's relatively rare for a bit to get corrupted in a network packet.
>
> And, when it does, it's almost certainly caught by lower-level
>
> mechanisms such as ethernet frame CRC. Much more likely is for a packet
>
> to get dropped because of queue overflow, or for sequential packets to
>
> arrive out of order due to multiple transmission paths with different
>
> latencies. Those are the sorts of things TCP protects against.
>
>
>
> Sure, you could implement retransmit timers and packet reordering in
>
> user code, but it would be distinctly non-trivial and ultimately you
>
> would end up reinventing most of TCP. Except that your implementation
>
> would suck compared to the kernel algorithms which have been
>
> continuously tested and fine-tuned for the past 30 years.
More information about the Python-list
mailing list