Re: Using IP or hostname for NSConnections rootProxyForConnectionWithRegisteredName:host:
Re: Using IP or hostname for NSConnections rootProxyForConnectionWithRegisteredName:host:
- Subject: Re: Using IP or hostname for NSConnections rootProxyForConnectionWithRegisteredName:host:
- From: Chuck Fleming <email@hidden>
- Date: Mon, 29 Mar 2004 12:53:39 -0800
Hi,
It sounds like your ultimate goal is to use DO between different
machines. If that's the case, briefly here's what you'll need.
On the server side:
NSSocketPort's initWithTCPPort:
followed by
NSConnection's initWithReceivePort:sendPort:
On the client side:
NSSSocketPort's initWithRemoteTCPPort:host:
followed by
NSConnections's initWithReceivePort:sendPort:
Chuck
On Mar 28, 2004, at 9:18 PM, Mark Walker wrote:
I'm just beginning to work the distributed objects and I had great
initial success getting a vended object using the following
incantation:
myServer = [[NSConnection
rootProxyForConnectionWithRegisteredName:myVendedObject
host:serverName] retain];
Where myServer is of type id, myVendedObject is the name of the root
object set by the server. serverName is where I'm having the problem.
When serverName is set to nil and my client is on the same machine as
the server everything works fine. If I set serverName to the IP address
of my machine it no longer works.
All the examples I can find pass nil or @"" to the host parameter so I
have very little to go on to fix my problem.
I also tried setting serverName to @"*" as suggested by some of the
googled results but I think that's specific to OpenStep (?)
Any help would be appreciated.
-mark
_______________________________________________
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.
_______________________________________________
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.