Re: Problems with NSSocketPort
Re: Problems with NSSocketPort
- Subject: Re: Problems with NSSocketPort
- From: Ben Lachman <email@hidden>
- Date: Tue, 11 Feb 2003 12:32:21 -0500
On Tuesday, February 11, 2003, at 12:25 PM, Douglas Davidson wrote:
On Monday, February 10, 2003, at 09:00 PM, Ben Lachman wrote:
NSSocketPort *port = [[NSSocketPort alloc] initWithTCPPort:portNum];
NSConnection *conn = [[NSConnection alloc] initWithReceivePort:port
sendPort:nil];
...
The problem is that port is never non-NULL, which makes conn be NULL
as well.
This wouldn't be a low port number, would it? Port numbers < 1024 can
only be bound by root. Try a larger number.
Nope, it does it even if I let the system chose the the port number
using [[NSSocketport alloc] init] instead. Anyway, it still happens
when I run it as root as well.
I think it has to do with the NKE I'm developing along side of the DO
userland app. I figured out that whenever the NKE is loaded
[[NSSocketport alloc] init] returns NULL and whenever its not loaded it
works fine. The confusing thing is that the NKE really doesn't do too
much, it patches the UDP and TCP protocols, and records data about
connections at the socket level. It also uses the PF_NKE proto to
communicate with the userland cocoa foundation logging tool, but
nothing else. I don't get any error messages from the OS back or
anything, just a NULL pointer and no info.
I'm really stumped. Thoughts?
->Ben
--
I think that the anti-Microsoft sentiment is simply due to their
having been so successful selling a lot of crap. -- The Woz
_______________________________________________
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.