[slime-devel] Patch to allow local network address family

Stas Boukarev stassats at gmail.com
Tue Oct 19 15:48:04 UTC 2010


Gilaras Drakeson <gilaras at gmail.com> writes:

> Hi,
>
> Below is a patch to allow local network address family (aka AF_UNIX, UNIX
> domain sockets).  Note that `open-network-stream' just calls
> `make-network-process'.
>
> diff --git a/slime.el b/slime.el
> index 8fc44ce..4afa883 100644
> --- a/slime.el
> +++ b/slime.el
> @@ -1497,7 +1497,12 @@ first line of the file."
>  (defun slime-net-connect (host port coding-system)
>    "Establish a connection with a CL."
>    (let* ((inhibit-quit nil)
> -         (proc (open-network-stream "SLIME Lisp" nil host port))
> +         (proc (if (and (stringp port) (eq ?/ (string-to-char port)))
> +		   ;; consider a string starting with "/" a local service
> +		   (make-network-process :name "SLIME Lisp" :buffer nil
> +					 :service port :family 'local)
> +		 (make-network-process :name "SLIME Lisp" :buffer nil
> +				       :host host :service port)))
>           (buffer (slime-make-net-buffer " *cl-connection*")))
>      (push proc slime-net-processes)
>      (set-process-buffer proc buffer)
>
>
> AF_UNIX is beneficial in the sense that it can speedup communication
> between emacs and the lisp process
It can, but does it? And is the amount by which it speeds up noticeable?

-- 
With Best Regards, Stas.




More information about the slime-devel mailing list