• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problems with NSSocketPort
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
  • Follow-Ups:
    • Re: Problems with NSSocketPort
      • From: Ben Lachman <email@hidden>
  • Prev by Date: Cocoa OO plumbing question
  • Next by Date: AddressBook issues
  • Previous by thread: Cocoa OO plumbing question
  • Next by thread: Re: Problems with NSSocketPort
  • Index(es):
    • Date
    • Thread