emacs-devel
[Top][All Lists]
Advanced

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

Re: GNU Emacs: Client/Server


From: Kim F. Storm
Subject: Re: GNU Emacs: Client/Server
Date: 30 Jan 2004 14:03:46 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

"Dhruva Krishnamurthy" <address@hidden> writes:

> > 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?).

(Yes) -- in emacs, network processes do not run in a separate thread.

> 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.

Stefan has already rewritten start-server to use an internal server
process rather than the external emacsserver program.  It listens on a
local (unix) socket for emacsclients to connect.

As Stefan has pointed out, using TCP (or UDP) would be a generally
useful solution on other platforms.

There are some security issues here, but maybe it would be sufficient
to restrict such use to local emacsclients, e.g. by binding the 
server to the local-interface, i.e. 127.0.0.1:<EMACSPORT>.


-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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