NSSocketPortNameServer
NSSocketPortNameServer
- Subject: NSSocketPortNameServer
- From: Ed Silva <email@hidden>
- Date: Thu, 20 Dec 2001 10:29:05 -0800
Hello all,
I am working on a PDO application which needs to work across a
network. In my server code I have the following (NAME_SERVER_PORT
is a defined number ):
[[NSSocketPortNameServer sharedInstance]
setDefaultNameServerPortNumber:NAME_SERVER_PORT];
[[NSSocketPortNameServer sharedInstance] registerPort:in_port
name:@"PDOTest" nameServerPortNumber:NAME_SERVER_PORT];
When run this gives me:
PDOTest has exited due to signal 13 (SIGPIPE).
The gdb backtrace looks like this:
#0 0x70012538 in sendto ()
#1 0x701b980c in CFSocketSendData ()
#2 0x701d4cbc in __CFRangeMake ()
#3 0x701b92d0 in CFSocketRegisterValue ()
#4 0x701b919c in CFSocketRegisterSocketSignature ()
#5 0x708a370c in -[NSSocketPortNameServer
registerPort:name:nameServerPortNumber:] ()
#6 0x00002604 in -[DistributedResource init] (self=0x5e370,
_cmd=0x706e2644) at
DistributedResource.m:23/Users/ed/Projects/PDOTest/
#7 0x000022f4 in main (argc=1, argv=0xbffffdac) at
main.m:15/Users/ed/Projects/PDOTest/
#8 0x00002144 in _start ()
#9 0x00001f74 in start ()
Now, my question is: Am I doing something stupid or is
NSSocketPortNameServer broken?
If I'm doing something dumb can some enlightened soul please clue
me in? The documentation on PDO is a bit lacking and I'd really
like to be able to have my client applications query the name
server for the ports used by the server, rather than have things be
set statically.
My client/server communication works great across TCP, it's just
setting up the name server that has me stumped.
On a side note doing an nmap scan of my PDO server's port causes a
SIGBUS.