Skip navigation.
 
mlNetwork notifications
FROM : Randall Meadows
DATE : Mon Mar 31 20:23:25 2008

My app registers a bonjour service, but basically it's really just 
advertising the web server running on the same machine as my app, with 
a little extra information pertaining to my app.  My app places files 
in a known location in the hierarchy that apache is serving, and I 
need to send out a notification when I make a change that's visible 
via that hierarchy, so that remote apps can pick up the changes.  The 
docs for NSDistributedNotificationCenter say I need to use distributed 
objects to communicate this fact to other computers (not just 
processes on my own).  But to use DO, there needs to be a known 
connection between my app and the remote app, right?  We don't want 
this connection, hence our move to serving these files via the built-
in web server.  (I have control over this remote app, and can make it 
listen for whatever I want.)

I tend think NSNetService is what I want; it's what I use for the 
registering the service to begin with, but it's unclear to me how I 
can use that for momentary notifications ("this file changed", "this 
file is new"), as opposed to notifying about a long-lived service 
("here's a web server").  And taking a brief look at 
NSNetServiceBrowser, I can see how to easily find the service to begin 
with, but it's not obvious how it would be notified of the changes 
without re-searching for the same service it already knows about.

Is there some sort of NSNotification variant that I've missed for use 
between remote apps (not on the same machine, but on the same LAN)?


Thanks!
randy

Related mailsAuthorDate
mlNetwork notifications Randall Meadows Mar 31, 20:23
mlRe: Network notifications Hamish Allan Mar 31, 20:34
mlRe: Network notifications Randall Meadows Mar 31, 21:47
mlRe: Network notifications Hamish Allan Mar 31, 22:41
mlRe: Network notifications Jens Alfke Apr 1, 06:03
mlRe: Network notifications Hamish Allan Apr 1, 10:35
mlRe: Network notifications Randall Meadows Apr 1, 17:03
mlRe: Network notifications Jens Alfke Apr 1, 17:13
mlRe: Network notifications Randall Meadows Apr 1, 17:25
mlRe: Network notifications Jens Alfke Apr 1, 18:05