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

NSConnection Problem


  • Subject: NSConnection Problem
  • From: "Michael P. Rogers" <email@hidden>
  • Date: Fri, 12 Oct 2001 09:04:25 -0500

What goes in the host field when I'm trying to get a proxy to a remote object, using rootProxyForConnectionWithRegisteredName:host:? I tried using the DNS name of my remote computer, but that doesn't seem to work (in the sense that messages don't seem to be getting to my remote object -- nothing's showing up in the console).

Do I have to register the NSConnection object first, somehow?

For the record, here's what I'm doing in my server's awakeFromNib method:

NSConnection * theConnection;

woofie = [[Dog alloc]init];

theConnection = [NSConnection defaultConnection];
[theConnection setRootObject:woofie];
if([theConnection registerName:@"MyFavoriteServer"] == NO)
NSLog(@"Something bad happened in awakeFromNib");


and here's what I'm doing in the client's action (when I click on a button):

id theProxy;
theProxy = [[NSConnection rootProxyForConnectionWithRegisteredName:@"MyFavoriteServer" host:@"math.millikin.edu"] retain];
[theProxy setProtocolForProxy:@protocol(AnimalProtocol)];

[theProxy bark];

Thanks for any assistance,

Michael
--
Dr. Michael P. Rogers
Office: 203G Shilling Hall
Phone: 217-424-6327 (W) 309-828-8655 (H) 309-825-6454 (C)
E-Mail: email@hidden

Web site: http://math.millikin.edu/
Astronomy Site: http://twincityamateurastronomers.org


  • Prev by Date: Re: Slow updating TextView
  • Next by Date: Re: Slow updating TextView
  • Previous by thread: Re: Slow updating TextView
  • Next by thread: Antialiasing stuff not working as I thought it would
  • Index(es):
    • Date
    • Thread