Code:
--------------------
m...@montreux:~$echo 'players' | nc -w1 127.0.0.1 9090
players count%3A4
m...@montreux:~$echo 'rescan' | nc -w1 127.0.0.1 9090
rescan
m...@montreux:~$echo 'serverstatus' | nc -w1 127.0.0.1 9090
serverstatus rescan%3A1 progressname%3AMerge%20Various%20Artists
progressdone%3A701 progresstotal%3A2139 version%3A7.4.2
uuid%3A0ec8f46a-14b2-4fa7-9233-c1bb5c6d26e4 info%20total%20albums%3A2361
info%20total%20artists%3A998 info%20total%20genres%3A55
info%20total%20songs%3A16448 player%20count%3A4 sn%20player%20count%3A0
other%20player%20count%3A0
m...@montreux:~$
--------------------
Looks like nc returns stuff on my (linux) machine running SC 7.4.2.
Maybe you want to do stuff with "unix sockets" to do local-only
communication, rather than using pipes ? I think the code I posted a
long while ago to do some power management under the mac (a daemon
launched as root and a userland script launched by srvPowerControl) was
communicating over a unix socket.
I'm sure O'Reilly has all the info you'd ever need, in its Perl or Unix
series. Right here is an illegitimate link to the Perl Cookbook on unix
sockets, nasty ads included:
http://docstore.mik.ua/orelly/perl/cookbook/ch17_01.htm
--
epoch1970
Daily dose delivered by: 2 SB Classic (fw 130), 1 SB Boom (fw 50)
SqueezeCenter 7.3.4 (Debian 5.0) with plugins: ContextMenu,
SaverSwitcher by Peter Watkins Server Power Control by Gordon Harris
WeatherTime by Martin Rehfeld IRBlaster by Gwendesign (Felix)
FindArt, CDplayer by bpa BBC iPlayer, SwitchPlayer by Triode
PowerSave by Jason Holtzapple TrackStat by Erland Isaksson.
------------------------------------------------------------------------
epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711
View this thread: http://forums.slimdevices.com/showthread.php?t=83539
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix