udp: Remove chunk queueing.
authorAndre Noll <maan@systemlinux.org>
Wed, 6 Oct 2010 22:08:31 +0000 (00:08 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 31 Oct 2010 11:18:24 +0000 (12:18 +0100)
commit0348a38aa0616abf887063d980cbef76914599f5
treeb33afde033a2853a890eaa990b2bf3ca518e9164
parente7f4c5362b313e84bf048b87c35deea21d564a4b
udp: Remove chunk queueing.

This was broken beyond repair for several reasons:

First of all, not each write to a UDP socket with no listener on
the remote leads to a write error. For a local connection on Linux,
only each second write yields ECONNREFUSED while all others seem to
succeed. So we would only queue each second FEC slice which is next
to useless.

Secondly, only buffer references are stored in the chunk queue, the
buffer contents are not copied for performance reasons. This works fine
if the buffers point to the read-only memory map of the audio file,
which is the case for the HTTP sender, but not for the UDP sender.
In fact, for UDP the buffer is always the same, namely ->enc_buf of
the FEC client struct for the UDP target.

Finally, it is not clear that the buffer references stored in the chunk
queue are still valid when the chunk queue is emptied by sending the
buffers since vss.c might have realloced the enc_buf.

So remove that broken code and be happy.
udp_send.c