Re: Distributed Objects over a Network
Re: Distributed Objects over a Network
- Subject: Re: Distributed Objects over a Network
- From: Chris Kane <email@hidden>
- Date: Tue, 6 Aug 2002 10:23:40 -0700
On Monday, August 5, 2002, at 06:36 AM, Pierre-Looc Raynaud wrote:
>
I'm trying to write an application that uses DO over a network. [...]
>
All is working perfectly well, as long as I'm using 127.0.0.1 as the
>
recipient IP address.
>
>
- (IBAction)sendMessage:(id)sender
>
{
>
id server;
>
NSSocketPort *port = [[NSSocketPort alloc]
>
initRemoteWithTCPPort:9000 host:[mIP stringValue]]; /* AAAA : returns
>
nil when host is not 127.0.0.1 */
>
NSConnection *connection = [NSConnection
>
connectionWithReceivePort:nil sendPort:port];
>
server = [connection rootProxy];
>
[server setProtocolForProxy:@protocol(MyServerInterface)];
>
[server doStuff:[mMessage string]];
>
}
Are you sure that -initRemoteWithTCPPort:host: allows the host argument
to be in IPv4 dotted-decimal notation? Did you see that described as
possible somewhere? That's probably the problem.
Here's a release note from the 10.2 Foundation release notes that
relates to this:
-[NSSocketPort initRemoteWithTCPPort:host:] and IP Addresses
This initialization method now allows the host: parameter string to be
an
IPv4-style and IPv6-style address in addition to an ordinary host name.
An executable must be compiled on or after 10.2 for this change to
take effect.
Chris Kane
Cocoa Frameworks, Apple
_______________________________________________
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.