emacs-devel
[Top][All Lists]
Advanced

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

Re: w32 does not have emacsclient/server


From: Stefan Monnier
Subject: Re: w32 does not have emacsclient/server
Date: Mon, 08 Aug 2005 19:49:36 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin)

> server.el now creates an AF_INET socket, at an unspecified port. The
> host address is local (127.0.0.1) unless the user customizes the
> variable `server-host' to the IP or name to use to bind the socket.
> The server generates a 64-byte random string (not random bytes, but
> printable characters in the range `!'..`~'; it's still about 420 bits
> of entropy) and writes in `server-file' (by default "~/.emacs.server")
> the host, port and authentication string. Connections are expected to
> pass as the first thing in a communication exchange the string "-auth
> AUTHENTICATION-STRING" where AUTHENTICATION-STRING is the 64-byte
> secret key; otherwise the connection is closed immediately.

Sounds very good.  To the host, port, and auth, I'd add a "server
name" entry, which would default to "server", to reproduce the
socket-name thingy.

> In emacsclient.c I've got rid of all AF_UNIX stuff.

Doesn't sound so good.  I'd rather make it possible to choose between Unix
and TCP sockets (default to Unix when possible, and TCP otherwise).

> I've also changed the code to use send/recv instead of writing to a file
> handle (was easier than fighting two Windows C compilers' idiosincrasies)
> and added buffering so data is only sent on receiving "\n" or filling the
> buffer.

Fair.

> Argument `socket-name' has been replaced by `server-file', to
> indicate the path to the server config/auth file (alternatively, the
> variable EMACS_SERVER_FILE can be set to point to the file; and BTW,
> a better name for the variable would be very welcome).

I'd rather see "server-name" which could be a path to a unix socket (like
now) or just a relative name of a unix socket (like now) or the name of
a server to be found in ~/.emacs.servers.  I.e. if there is no unix socket
of that name, lookup ~/.emacs.servers for TCP servers.

> The last change has been to make it consider \path and c:path as absolute
> paths (previously it would prepend the current directory to Windows-style
> absolute paths).

Of course this should only be done under w32.

> environments it'd be posible to use emacsclient/server.el with a fixed
> address/port and no .emacs.server file (emacsclient would have to grow
> --server-address and --server-port options, of course).

What would be the benefit?


        Stefan




reply via email to

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