• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSConnection - both ways
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSConnection - both ways
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: Custom NSSlider
  • Next by Date: Re: After Autoreleasing Still Getting Leaked
  • Previous by thread: Hiding/Showing UIAgent application window
  • Next by thread: Re: NSConnection - both ways
  • Index(es):
    • Date
    • Thread