PDA

View Full Version : Changing connection timeout, CLI



ahlstromc
2006-04-09, 19:03
I'm using the Crestron (CLI) protocol to control
a SqueezeBox via the SlimServer.

I need quick notification when the SqueezeBox is
unplugged (power or network cable).

Right now, I can pull the plug, and the SlimServer
will continue to return a status ("mode") of "play"!

I can send a "connect ?" and eventually get a 0
result (after a series of 1 results). But it takes
about 45 seconds to become 0.

Is there a way to get the SlimServer to detect the
disconnection more rapidly (even if I have to edit
the perl), or am I stuck with the OS TCP timeout?

Thanks!

Chris Ahlstrom

Fred
2006-04-10, 14:06
Part of the reason for the behaviour is that wireless connections can drop for an instant (and this going un-noticed by the user because of the large buffer). Now the difference between dropping temporarily and dropping completely, viewed from the server, is the length of the drop.

The CLI does not apply any logic to the values you have, they're the values from within the server internals, and from my memory there isn't much you can do there to get faster notice.

HTH

Fred

ahlstromc
2006-04-12, 04:43
Thanks, Fred.

I'm thinking that $ACK_TIMEOUT in
Networking/Stream.pm is the variable to
reduce, but haven't had time to try out
ActiveState yet.

It's a shame to have to purchase a
compiler to build a Perl EXE, sigh.

Chris

Grotus
2006-04-12, 11:46
ahlstromc wrote:
> Thanks, Fred.
>
> I'm thinking that $ACK_TIMEOUT in
> Networking/Stream.pm is the variable to
> reduce, but haven't had time to try out
> ActiveState yet.
>
> It's a shame to have to purchase a
> compiler to build a Perl EXE, sigh.
>
> Chris
>
>

You don't have to build the .exe. You can just do perl slimserver.pl.
You can even use svrany.exe to run it as a service without building the
..exe.