[launchd-dev] Listening socket and fast user switching
Dave Dribin
dave-ml at dribin.org
Thu May 22 12:05:07 PDT 2008
On May 22, 2008, at 2:01 PM, Dave Zarzycki wrote:
> Dave,
>
> The Apple way to solve this problem is to use Bonjour with a dynamic
> port assignment. Just use port zero, and set Bonjour to true like so:
>
> <key>Sockets</key>
> <dict>
> <key>Listeners</key>
> <dict>
> <key>Bonjour</key>
> <true/>
> <key>SockServiceName</key>
> <string>0</string>
> </dict>
> </dict>
That's what I thought, but I'm thinking this won't quite work for this
case. Our agent is actually an HTTP server, and we hand out URLs to
stuff it serves up, e.g. http://localhost:12345/foo. If we use a
dynamic port, even with Bonjour, our URLs are no longer valid. Unless
there's a way to specify Bonjour ports in URLs? I thought that only
worked for host names, though (i.e. <name>.local).
-Dave
More information about the launchd-dev
mailing list