discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use DO in a Foundation-based daemon


From: Quentin Mathé
Subject: Re: How to use DO in a Foundation-based daemon
Date: Thu, 19 Oct 2006 23:23:28 +0200

Le 19 oct. 06 à 08:21, Richard Frith-Macdonald a écrit :

On 19 Oct 2006, at 00:59, Quentin Mathé wrote:

But I still think there is a host related issue, because my code seems correct if you take in account my daemon is for a single user on a single machine. In my test, it fails in the method -[NSMessagePortNameServer portForName:onHost:]. With NSMessagePort debug level turned on, I get the following ouput :

portForName: /etoilesystem host: pcubuntu
non-local host

Your host name is wrong ...
When you want a connection for the current host you must specify an empty string as the host (or an asterisk ... which means any host). Actually, I think gnustep allows nil as well ... but I wouldn't guarantee that, and would doubt that using nil is portable to MacOS-X

That's was the problem. I tested with nil on GNUstep, it works fine now.

Maybe the message port name server ought to allow any local host name

This would make sense.

(or even simply ignore the host argument) ... I haven't checked MacOS-X behavior ... the current behavior in GNUstep inherits from the old NeXT behavior where a host name implied the corresponding IP address. Probably we should either ignore the host or generate an error log or raise an exception ... whatever MacOS-X does.

Why not check if the host name is a local host name. If so, ignore it. If not, raise an exception telling the default connection cannot be used for inter-machines communication, a connection relying on NSSocketPortNameServer must be created.

Thanks,
Quentin.

--
Quentin Mathé
qmathe@club-internet.fr





reply via email to

[Prev in Thread] Current Thread [Next in Thread]