NSConnection
NSConnection
- Subject: NSConnection
- From: email@hidden
- Date: Thu, 6 Feb 2003 04:38:47 -0800
I'm trying to get Cocoa's distributed objects working between two machines.
The client has this code:
id theProxy;
theProxy = [[NSConnection rootProxyForConnectionWithRegisteredName:@"XXXX"
host:hostName] retain];
[theProxy test]; <--- theProxy is nil
where hostName is the ip address of the machine I'm trying to contact.
The server (host) has this code:
NSConnection *theConnection;
theConnection = [NSConnection defaultConnection];
[theConnection setRootObject:self];
if ([theConnection registerName:@"ClipboardWaitress"] == NO)
{
/* Handle error. */
fprintf(stderr,"error\n");
}
and...
- (BOOL)test
{
fprintf(stderr,"test\n");
return TRUE;
}
Anyone see what I'm doing wrong as to why the apps can't talk over
the network. I have some of it right since the app can talk to
itself via NSConnection if I give an empty hostname.
I also know the app isn't even trying to access the network since I'm
running little snitch and it tells me when an app tries the network.
Thanx for the help, SDerman.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.