Re: problem with DO
Re: problem with DO
- Subject: Re: problem with DO
- From: Lloyd Dupont <email@hidden>
- Date: Wed, 23 Apr 2003 09:05:51 +1000
thanks, I will try that in the next few minutes ...
On Tuesday, April 22, 2003, at 05:19 PM, Greg Hulands wrote:
I think you would need to create an instance of NSConnection, not just
use the default connection.
eg
<code snippet>
//setup DO connection
NSSocketPort *sport = [[NSSocketPort alloc] initWithTCPPort:port];
if (![[NSSocketPortNameServer sharedInstance] registerPort:sport
name:serverName])
NSLog(@"Error registering with NSSocketPortNameServer");
connection = [[NSConnection alloc] initWithReceivePort:sport
sendPort:nil];
[connection setRootObject:self];
</code snippet>
HTH,
Greg
On Tuesday, April 22, 2003, at 04:03 PM, Lloyd Dupont wrote:
this code sample (below) doesn't work (I mean registerName: return NO)
what could be wrong ?
does NSSocketPortNameServer require specific initialization ?
id serverObject = [[Server new] autorelease];
NSConnection * theConnection = [NSConnection defaultConnection];
[theConnection setRootObject: serverObject];
if([theConnection registerName:@"mon serveur a moi"
withNameServer:[NSSocketPortNameServer
sharedInstance]] == NO) {
_______________________________________________
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.