Based on Frank's feedback, I have pushed this commit to the brolley/dev
branch on pcpfans. The updated code supports auto-advertising of all
request ports during __pmServerOpenRequestPorts() and auto-unadvertising
during __pmServerCloseRequestPorts().
With pmcd, there is currently a small issue in that it opens its log
after calling __pmServerOpenRequestPorts(), so the informational log
messages indicating that the service is being advertised end up on
stderr. Is there any reason not to open the log first?
Dave
---------------------------
commit 5cdeaa18b367a16d80a1a6066116d74749281929
Author: Dave Brolley <brolley@xxxxxxxxxx>
Date: Mon Oct 7 16:21:55 2013 -0400
libpcp support for servers to advertise on the local network.
- Support is provided by Avahi, where available and otherwise disabled.
- Servers indicate that they want to advertise their presence by
calling __pmServerSetServiceName() and/or __pmServerSetServiceTag().
When one or both of these functions has been called before
__pmServerOpenRequestPorts(), then __pmServerOpenRequestPorts() will
advertise the server once for each port it is listening on. The
service
for each port will be unadvertised when __pmCloseRequestPorts() is
called or when the server shuts down.
- Servers may also advertise themselves directly by calling
__pmServerAdvertisePresence()/__pmServerUnadvertisePresence()
|