Juanma Barranquero wrote:
in server.el, use a TCP server socket (on a non-specified port).
Once opened, check to see which port was used. Write the port
and hostname together with a secret random string into
~/.emacs_server. When a connection comes in, check that the
first bytes sent are exactly the same as the random string
I suppose this is to avoid choosing a port number as the standard
"Emacs server port"? I'd rather choose a number, and let the user set
it up on server.el and pass it to emacsclient.c in case there's a
conflict on her system...
Multiple users can start servers on the same machine, so assigning a
"standard" port is likely to conflict. It is better to let the socket
library choose a free socket. The client will be reading it from a file
anyway, so the user does not need to know what port has been chosen.
Another parameter to pass would be the ip address, wouldn't?
Stefan's spec above already includes the hostname.
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel