On 19/02/02 03:06, Jack Moffitt shaped the electrons to
say:> > The point is, is this list related to icecast2 development? I made
some
> > changes to the server and sent a patch to Jack Moffitt, but I'm
not sure
> > he's still mainaining the server.
>
> You're in the right place, and I still maintain the server. I
don't
> remember your patch right off-hand but I'm going to look for it now.
Just in case, I copy the mail and attach the patch.
I am working in my second version (not included in the patch), I would like
to hear some comments:
- prebuffering parameter (used in previous patch) in now configurable in
<limits>...<prebuffer>seconds</prebuffer>...
- instead of disconnecting when the client-queue > 25, I discard packages
wich are older than prebuffer*2. All clients I tried have recovered very
well, even with a ping -f running behind.
Regards,
------------
Dear Jack,
find attached a patch that improves a lot the performance and
reliability in
the server. Specifically, I started the modifications due to the
unreliability of the connection (mainly due to the lack of control in the
nonblocking socket) when the client pipe was saturated, even for few seconds,
for exaple due to a web page download.
The problems tackled by this patch are:
1. The server didn't check for the status of the client's socket before
the
unblocking send(). This caused a disconnection at the minimum delay in the
network. I've added a poll in sock.c
2. Many vorbis players do a very bad job in prebuffering (notably freeamp),
so we are forcing a kind of prebufering now. The server keeps the last
seconds of each source, when a new client connects, we send these previous
buffers as fast as the network allows (this is checked by -1-). To allow the
control by seconds instead of time, I added a timestamp to refbuf (which
could be also used by checking the client queue length by seconds).
3. Solved a bug in source.c, when checking for recoverable error. It has to
be done _only_ when result < 0.
4. Created a new function (send_client_queue) to send the client->queue.
Better modularisation.
5. When a new client is added, we send the metadata right after adding it to
the queue (I use the previous function). This improve a lot startup time
inthe client.
6. Moved queue_lenght verification to the send_client_queue(). It doesn't
make sense to do it if there is no pending buffers.
7. Added TCP_NODELAY to a nonblocking socket. It is said that it's improve
performance in Linux. TODO: check Win32 compatibility.
You can try my version in http://mcrg.uib.es:8000/live.ogg (if the server is
down, please wait few seconds and try again, I am restarting it frequently
for my tests).
Conclusions: _very_ stable connection, it recovers from network congestion
very nicely.
Don't hesitate to ask me for changes or improvements to my patch.
<p>Regards,
--
ricardo galli
gallir@uib.es
http://m3d.uib.es/~gallir/
"I just stopped using Windows and now you tell me to use Mirrors?"
- said Aunt Tillie, just before downloading 2.5.3 kernel.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch1.diff
Type: text/x-diff
Size: 9489 bytes
Desc: patch1.diff
Url :
http://lists.xiph.org/pipermail/icecast-dev/attachments/20020219/b99eab65/patch1.bin