Re: Preferred portable way to talk to a server process

Joachim Ziegler <[email protected]>
Newsgroups gmane.comp.mozilla.devel.nspr
Message-ID <[email protected]>
Wan-Teh Chang wrote:
 >
 > This is an area that NSPR doesn't address.  You'll need to
 > use platform-specific ways to do that.  It is true that Unix
 > signals are not supported on Windows.

Thank you for your quick and disillusioning answer. :-)

But anyway, how do I do it then? This means that my otherwise clean NSPR 
code will be polluted with #ifdef's?

A second question: A typical server process blocks in a PR_Accept(), 
waiting for clients to connect.

The reference page says: "PR_Accept blocks the calling thread until 
either a new connection is successfully accepted or an error occurs."
Now suppose that I want to shutdown the server process. How can I do 
that? How can I make the process unblock and test a Boolean shutdown 
variable? (Even with using signal, this would not not work according to 
the text cited above.)

BTW, what's the definite reference for NSPR (yes, I am a newbie):

http://www.mozilla.org/projects/nspr/

or

http://developer.mozilla.org/en/docs/NSPR_API_Reference (the wiki)

Gretings and thanks,
Joachim
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.