Re: Why is Leopard annoying my users?
Re: Why is Leopard annoying my users?
- Subject: Re: Why is Leopard annoying my users?
- From: Alastair Houghton <email@hidden>
- Date: Tue, 20 Nov 2007 18:09:17 +0000
On 20 Nov 2007, at 18:06, James Bucanek wrote:
Alastair Houghton <mailto:email@hidden> wrote
(Tuesday, November 20, 2007 9:12 AM -0000):
Could this (above) be the problem? The docs for NSConnection say:
"If receivePort is nil, the NSConnection object allocates and uses a
new port of the same class as sendPort."
It's just a guess, but I wonder if the issue might be that it's
allocating a TCP socket rather than a UNIX domain socket... after
all,
it has no way to name a UNIX domain socket if it allocates a new
NSSocketPort.
I'm beginning to suspect that you're correct. I think NSConnection
is just creating a generic NSSocketPort, which defaults to a
randomly assigned TCP socket, for the return communications path. I
had assumed that it would simply have used the pipe for both -- but
maybe that's not even possible.
If that's the case, then one solution might be to create two pipes
and specify both the receive and send ports for the NSConnection.
Did you try specifying both the send and receive ports as the same
NSSocketPort? I know the docs imply that that won't work in one of
the two directions, but I suspect the docs are wrong (they're probably
assuming Mach ports, which are one-way things, whereas sockets are two-
way).
I think it's also true that you can work around the Mach port issue if
you're careful. There are some tech notes on the subject, I think.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden