On Mar 25, 2009, at 07:27:13, rlhamil wrote:
> * are the two-byte fields (flags and the various lengths) in network
> byte order?
Yes.
> * The page above mentions UDP port 9887, but says "The UDP protocol
> is not advertised because its port number is configurable by the
> user." However, while the preference pane certainly _tells_ me the
> TCP and UDP port numbers, I don't see any option to configure them.
> Are they only configurable by altering the source code?
No; you can use Mac OS X's user defaults system to set the port. That
requires a command such as:
defaults write com.growl.growlhelperapp GrowlUDPPort -int 42000
However, unless your users are comfortable in the terminal, feel like
diving into our source code to learn how to change the port, and even
know that it's changeable, I wouldn't worry about it.
Perhaps if you intend to release your notifier to the public, you may
want to make the port configurable. Or use Bonjour.
> * is growlnotify reliable enough that I could just posix_spawn() it,
> which would avoid all the issues with a network connection?
When using the UDP protocol, yes it is. However, only one user's
GrowlHelperApp can bind a socket on our UDP port at a time, which
means only one user per machine will see your notifications.
> Would growlnotify work when run from something not in a user session
> context?
When using the UDP protocol, yes, because the UDP socket is not per-
session.
However, GrowlHelperApp itself *is* per-session (since it displays
notifications using windows in the user's session). You need a way to
communicate from the single rpc.walld to all of the GrowlHelperApps
that are running—one per logged-in user. Using UDP will only reach one
of them.
I'm actually not sure what would work, except to set each user's Growl
to listen on a different port and to make your rpc.walld send a
notification to every port you've set. To be honest, I don't think any
of us have ever had to solve the problem of multiple Growl processes
running on a single machine before.
Longer-term, it would probably be a good idea for us to create a
daemon that can listen for network notifications, and forward them to
every user's Growl process. The Growl processes, for their part, would
have to check in with this daemon to request a port number to
(locally) bind. Patches welcome.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Growl Discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/growldiscuss?hl=en
-~----------~----~----~----~------~----~------~--~---