Distributed Objects over Network
Distributed Objects over Network
- Subject: Distributed Objects over Network
- From: Eric Clements <email@hidden>
- Date: Sun, 8 Jul 2001 20:09:57 -0400
I am using Distributed Objects to share objects between 2 applications.
They work locally on the same machine when I use "nil" for the host:
parameter, but does not work over the Network between hosts with "host:"
set to @"*" (see below). My goal is to have them work over the network
and I am having NO LUCK. Does anyone know if I have to do something
special to make them work... Here is a snippet of the code:
Vending App:
-----------------
NSConnection *theConnection = [[NSConnection alloc] init];
[theConnection setRootObject:object];
if ([theConnection registerName:@"MonitorSrcDict"
withNameServer:[NSPortNameServer
systemDefaultPortNameServer]] == NO) {
NSLog( @"Couldn't Register %@", name );
}
Client App:
-----------------
srcDictConnection = [NSConnection
connectionWithRegisteredName:@"MonitorSrcDict"
host:@"*" usingNameServer:[NSPortNameServer
systemDefaultPortNameServer]];
I think the commands are right, but is there something else I need to
do? Maybe NetInfo related?
Thanks in advance,
Eric Clements