emacs-devel
[Top][All Lists]
Advanced

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

Re: GNU Emacs: Client/Server


From: Dhruva Krishnamurthy
Subject: Re: GNU Emacs: Client/Server
Date: Fri, 30 Jan 2004 16:01:12 +0530

On 30 Jan 2004 11:38:14 +0100, "Kim F. Storm" <address@hidden> said:
> > 
> > PS: I am not sending this mail to the list, not to annoy people who are
> > not interested.
> 
> I don't have all the answers (and questions) on this subject, so it
> is ok to CC: emacs-devel.

 Not a problem.

> The problem with your code is how to mix it with code that must ALSO wait
> on normal network receive and process output.  In your code, you have
> two waiting-points (as I understand it:)
> 
> >     fResult=GetMailslotInfo(g_CRAMP_Profiler.g_h_mailslot,
> 
> which I assume waits for connections, and
> 
> >       fResult=ReadFile(g_CRAMP_Profiler.g_h_mailslot,
> 
> which I assume waits to receive data.

Yes.

> Both of these must --somehow-- be wrapped in such a way that they
> become non-blocking operations and/or will function through the normal

This code will be running in it's own thread. So, the main thread is not
blocked (am I missing something?).

> "select" call which more or less combines all waiting points for async
> processing in emacs into one.  Actually, I'm not sure select is
> "normal" on W32, but that's the interface you need to emulate to add
> mail-slot support to emacs'.

No idea about that. Never used "select" (used it in PERL).

However, I just recalled that MAIL SLOTS in W32 uses UDP internally. So,
I am fairly certain now that we can get this working using
"make-network-process" in ELisp. I just wrote a very simple ELisp code
(has to be simple if I could write it!) to start a server and listen on a
port. Another method which establishes a connection if server is running
and sends expressions to be evaluated by the server. My gut feeling is
that we can easily have a Elisp implementation of basic "gnuserv"
functionality atleast to open files on existing GNU Emacs process.

Please corect me if I am wrong in my understanding or gross oversights.

with warm regards,
dhruva
________________________________________
Dhruva Krishnamurthy
Proud FSF member: #1935
http://schemer.fateback.com/




reply via email to

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