Problems with NSSocketPort
Problems with NSSocketPort
- Subject: Problems with NSSocketPort
- From: Ben Lachman <email@hidden>
- Date: Mon, 10 Feb 2003 22:19:07 -0500
Hi,
I dug out some old distributed object code that I know used to work,
but it doing weird stuff now. I can't seem to get a valid NSConnection
no matter what I do. I'm including the code, any help would be
appreciated.
- (void)startOnPort:(short int)portNum {
NSSocketPort *port = [NSSocketPort alloc];
NSConnection *conn = [NSConnection alloc];
[port initWithTCPPort:portNum];
if(port) {
[conn initWithReceivePort:port sendPort:nil];
} else {
NSLog(@"Null port object!");
}
[conn setDelegate:self];
[conn setRootObject:self];
[[NSRunLoop currentRunLoop] run];
[conn release];
[port release];
}
TIA,
->Ben
--
"Don't sweat it -- it's not real life. It's only ones and zeroes." --
Gene Spafford
_______________________________________________
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.