DO behavior depends on server launch
DO behavior depends on server launch
- Subject: DO behavior depends on server launch
- From: Phill Kelley <email@hidden>
- Date: Tue, 31 May 2005 22:40:33 +1000
G'Day!
I've noticed a strange thing and wondered if anyone else had seen it or
could offer an explanation.
I have a pair of apps that communicate via distributed objects. The server
vends a single object via defaultConnection setRootObject/registerName,
with the client side doing a rootProxyForConnectionWithRegisteredName.
The client has UI but the server is faceless. Both are Cocoa apps.
The client and server talk to each other quite happily, except in one
unusual case, and it seems to depend upon how the server process is
launched.
Assuming that the client is already running (launched from Finder via
double-click or run in Xcode), these methods of launching the server all
work (as in the client sees the server and connects):
1. Double-click the server from Finder.
2. In Terminal, launch the server by "open server.app".
3. In Terminal, launch the server by issuing a command like:
"./server.app/Contents/MacOS/server &".
4. From another machine, ssh to the test machine and launch
the server by "open server.app".
But this variation on the theme does *not* work (the
rootProxyForConnectionWithRegisteredName returns nil):
5. From another machine, ssh to the test machine and launch
the server via:
"./server.app/Contents/MacOS/server &".
In all cases, the client and server are running from the same Unix user-id.
Any ideas as to why case #5 should be different?
As a related question, the documentation for NSConnection and NSMachPort
appear to imply that connections are specific to a *host* but I have not
been able to get my client and server apps to communicate unless they are
both running under the same Unix user id. Is this the expected behavior?
Regards, PK
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden