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: "Mark" <email@hidden>
- Date: Mon, 29 Mar 2004 23:41:52 -0700
I'm surprised that I couldn't use an IP for the host parameter but your
clues pointed me in the right direction. I'm connecting using IP now -
albeit with a bit more lines of code.
Thanks very much.
-mark
-----Original Message-----
From: email@hidden
[
mailto:email@hidden] On Behalf Of Chuck Fleming
Sent: Monday, March 29, 2004 1:54 PM
To: Mark Walker
Cc: email@hidden
Subject: Re: Using IP or hostname for NSConnections
rootProxyForConnectionWithRegisteredName:host:
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.
_______________________________________________
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.