[icecast-dev] Second patch again CVS version

Ricardo Galli gallir at uib.es
Sat Feb 23 11:39:37 PST 2002


I send a patch again the last CVS version. The changes are:

- Configurable prebuffer, in seconds.

- prebuffering parameter in configurable in 
<limits>...<prebuffer>seconds</prebuffer>...

- Created a new function (send_client_queue) to send the client->queue. 
Better modularisation.

- Moved queue_lenght verification to send_client_queue(). 

- instead of disconnecting when the client-queue > 25, it discards packages 
wich are older than prebuffer*2 (maxlag, in seconds). All clients I tried 
have recovered very well.

- To avoid stalled connections, they are closed if the last package was sent 
before maxlag*2 (in seconds, which is prebuffer*4).

- The server didn't check for the status of the client's socket before the 
unblocking send(). This caused a disconnection at a minimun network 
congestion, causing a broken pipe error (Linux 2.4 behaviour?) in the 
network. I've just added a poll in sock.c. 

- Added TCP_NODELAY to a nonblocking socket. It is said that it's improve 
performance in Linux. TODO: check Win32 compatibility.

- Solved a bug in source.c, when checking for recoverable error. It has to 
be done _only_ when result < 0.

<p>I was very careful checking connection and memory leaks, the maximum RSS 
reported by ps is 1288 KB (after running several days).

000     0  4500     1   9   0 10768 1288 select S    ?          0:16 
/usr/bin/icecast2 -c /etc/icecast/icecast.xml
040     0  4501  4500   9   0 10768 1288 poll   S    ?          0:00 
/usr/bin/icecast2 -c /etc/icecast/icecast.xml
040     0  4506  4501  10   0 10768 1288 select S    ?          0:18 
/usr/bin/icecast2 -c /etc/icecast/icecast.xml
040     0  4507  4501   9   0 10768 1288 rt_sig S    ?          0:00 
/usr/bin/icecast2 -c /etc/icecast/icecast.xml
040     0  4508  4501   9   0 10768 1288 rt_sig S    ?          0:00 
/usr/bin/icecast2 -c /etc/icecast/icecast.xml
040     0  4514  4501  10   0 10768 1288 select S    ?          0:40 
/usr/bin/icecast2 -c /etc/icecast/icecast.xml

<p>Regards,


-- 
  ricardo
"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: patch2.diff
Type: text/x-diff
Size: 12878 bytes
Desc: patch2.diff
Url : http://lists.xiph.org/pipermail/icecast-dev/attachments/20020223/88dc822d/patch2.bin


More information about the Icecast-dev mailing list