* Triode shaped the electrons to say...

Find the line:
#       setsockopt $httpClient, SOL_SOCKET, SO_SNDBUF, MAXCHUNKSIZE;

and replace with:
        setsockopt $httpClient, SOL_SOCKET, SO_SNDBUF, MAXCHUNKSIZE * 2;

This won't make the server go any faster, but does seem to make use of
a larger tcp buffer in linux 2.6

FYI - here's a better patch which checks the size of the sndbuf first.

=== Slim/Web/HTTP.pm
==================================================================
--- Slim/Web/HTTP.pm    (revision 12581)
+++ Slim/Web/HTTP.pm    (local)
@@ -1276,9 +1276,16 @@

        push @{$outbuf{$httpClient}}, \%segment;

-#   May want to enable this later, if we find that that it has any effect on 
some platforms...
-#      setsockopt $httpClient, SOL_SOCKET, SO_SNDBUF, MAXCHUNKSIZE;
-       
+       # Set the kernel's send buffer to be higher so that there is less
+       # chance of audio skipping if/when we block elsewhere in the code.
+ # + # Check to make sure that our target size isn't smaller than the
+       # kernel's default size.
+       if (unpack('I', getsockopt($httpClient, SOL_SOCKET, SO_SNDBUF)) < 
MAXCHUNKSIZE) {
+
+               setsockopt($httpClient, SOL_SOCKET, SO_SNDBUF, (MAXCHUNKSIZE * 
2));
+       }
+
        Slim::Networking::Select::addWrite($httpClient, 
\&sendStreamingResponse);

        # we aren't going to read from this socket anymore so don't select on 
it...

-D
--
<iNoah> you know, most free operating systems come preinstalled with their own 
high horse.
_______________________________________________
beta mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/beta

Reply via email to