NSConnection - both ways
NSConnection - both ways
- Subject: NSConnection - both ways
- From: Nava Carmon <email@hidden>
- Date: Thu, 16 Jun 2011 11:40:15 +0300
Hi,
I'd like to establish connection between two processes. I'm using NSConnection from the server side:
Server Process
NSConnection *theConnection;
//theConnection = [NSConnection defaultConnection];
theConnection = [[NSConnection alloc] init];
[theConnection setRootObject:self];
[theConnection registerName:@"MyServer"];
and get the proxy object on the other side.
Client Process
NSConnection *theConnection;
theConnection = [NSConnection connectionWithRegisteredName:@"MyServer" host:nil];
self.remoteObject = [[theConnection rootProxy] retain];
And it works ok. My question is how do I establish the connection to both ways, so I can get the distributed object of the client in server, like both processes will serve as server and client for each other?
I tried to do the same other way with another name, but it didn't work for some reason.
Thanks
Nava Carmon
email@hidden
"Think good and it will be good!"
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden