On 12 Oct 2006, at 17:23, Quentin Mathé wrote:

Hi,

I'm looking for help on how to set up NSConnection properly in a gnustep daemon (Foundation only). I tried various strategies without success. I usually start gdomap from rc.local (running then with nobody identity), I have also tried to run it with root identity and the flags -fd.

First ... what is the connection for? should it work between different users on different machines, or is it for a single user on a single machine.

If the former, you need to use socket ports and need gdomap running
If the latter, you need to use message ports (the default) and do not need gdomap.

When I call -registerName: on the connection, the method returns YES as if everything went smoothly but on gdomap side I can clearly observe that nothing happened.

That's normal ... because gdomap is not needed/used unless you set up a connection using socket ports.

If you need to use socket ports, to create a connection do

connection = [[NSConnection alloc] initWithReceivePort: [NSSocketPort port] sendPort: nil];
[connection setRootObject: myserverobject];
[connection registerName: name withNameServer: [NSSocketPortNameServer sharedInstance]];

_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to