• 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
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: NSConnection
      • From: j o a r <email@hidden>
  • Prev by Date: Re: Action based undo or snapshot based undo? Summary!
  • Next by Date: Internet Config Example under Cocoa
  • Previous by thread: Re: Action based undo or snapshot based undo? Summary!
  • Next by thread: Re: NSConnection
  • Index(es):
    • Date
    • Thread