Re: Example of DO without nil as Host?
Re: Example of DO without nil as Host?
- Subject: Re: Example of DO without nil as Host?
- From: Douglas Davidson <email@hidden>
- Date: Fri, 18 Apr 2003 15:25:37 -0700
On Friday, April 18, 2003, at 2:31 PM, Craig Bakalian wrote:
I am thoroughly confused here. Is there an example of an NSConnection
to get a vended object with out passing nil as the host out there in
documentation land. I can't find one.
server = [[NSConnection rootProxyForConnectionWithRegisteredName:
@"testServer" host: [[NSHost currentHost]address] ]retain];
Also, [[NSHost currentHost]address] us returning the standard 127.0.0.1
for the local host. Yet, one would think that this would bounce in my
iMac and get the server named @"testServer", but it doesn't. Has
anyone out there used this NSConnection? Apple engineers?
This is a frequently asked (and answered) question. The answer is that
inter-machine DO requires the use of an NSPort subclass that supports
it, which the default subclass does not. NSSocketPort is such a
subclass, and examples have been circulated on this and other lists
demonstrating its usage. In Jaguar the NSSocketPortNameServer is
available, using Rendezvous for simple name service on the local
network (see the Jaguar release notes).
Douglas Davidson
_______________________________________________
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.