From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ulrich Mueller Newsgroups: gmane.emacs.devel Subject: Server protocol (was: Re: error in server-running-p on M$) Date: Sun, 23 Nov 2008 09:14:41 +0100 Message-ID: <18729.4337.83437.732524@a1ihome1.kph.uni-mainz.de> References: <18728.14527.648410.433140@a1ihome1.kph.uni-mainz.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1227428323 6688 80.91.229.12 (23 Nov 2008 08:18:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 23 Nov 2008 08:18:43 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: "Juanma Barranquero" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 23 09:19:45 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L4ABy-0003jQ-WC for ged-emacs-devel@m.gmane.org; Sun, 23 Nov 2008 09:19:43 +0100 Original-Received: from localhost ([127.0.0.1]:58176 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4AAp-0002I6-Lz for ged-emacs-devel@m.gmane.org; Sun, 23 Nov 2008 03:18:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L4AAl-0002I1-4W for emacs-devel@gnu.org; Sun, 23 Nov 2008 03:18:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L4AAi-0002Hp-EI for emacs-devel@gnu.org; Sun, 23 Nov 2008 03:18:25 -0500 Original-Received: from [199.232.76.173] (port=49395 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4AAi-0002Hm-BK for emacs-devel@gnu.org; Sun, 23 Nov 2008 03:18:24 -0500 Original-Received: from mx20.gnu.org ([199.232.41.8]:55993) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L4A7N-0005bQ-71; Sun, 23 Nov 2008 03:14:57 -0500 Original-Received: from a1iwww1.kph.uni-mainz.de ([134.93.134.1]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L4A7M-0001nX-9i; Sun, 23 Nov 2008 03:14:56 -0500 Original-Received: from a1ihome1.kph.uni-mainz.de (a1ihome1.kph.uni-mainz.de [134.93.134.75]) by a1iwww1.kph.uni-mainz.de (8.14.0/8.13.4) with ESMTP id mAN8EfOq018178; Sun, 23 Nov 2008 09:14:41 +0100 Original-Received: from a1ihome1.kph.uni-mainz.de (localhost [127.0.0.1]) by a1ihome1.kph.uni-mainz.de (8.14.0/8.14.1) with ESMTP id mAN8EfBg021894; Sun, 23 Nov 2008 09:14:41 +0100 Original-Received: (from ulm@localhost) by a1ihome1.kph.uni-mainz.de (8.14.0/8.14.0/Submit) id mAN8Ef8A021889; Sun, 23 Nov 2008 09:14:41 +0100 In-Reply-To: X-Mailer: VM 8.0.2-487 under Emacs 22.2.1 (i686-pc-linux-gnu) X-detected-kernel: by mx20.gnu.org: Linux 2.6 (newer, 1) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:106015 Archived-At: >>>>> On Sun, 23 Nov 2008, Juanma Barranquero wrote: >> Let me explore further if there is a simpler way to handle this. > If you want to propose changes to the way the TCP connections and > authentication files are used, please do it in a way compatible with > 22.X... It is incompatible already: Client 22 connecting to server 23: $ emacsclient-emacs-22 foo Waiting for Emacs... -error Unknown&_command:&_/local/home/ulm/foo Client 23 connecting to server 22: $ emacsclient-emacs-23 foo Waiting for Emacs... *ERROR*: Unknown message: Authentication failed The above is with TCP. With Unix sockets it is much worse, because the connection succeeds but the information sent by the client is misinterpreted by the server, resulting in several garbage buffers (the following is for client 23 connecting to server 22): ,---- | CRM Buffer Size Mode File | .% -current-frame 0 Fundamental /dev/pts/-current-frame | *scratch* 0 Lisp Interaction | * *Messages* 302 Fundamental | foo 6 Fundamental ~/foo | -file 0 Fundamental ~/-file | xterm 0 Fundamental ~/xterm | % 2 0 Fundamental /dev/pts/2 | % -tty 0 Fundamental /dev/pts/-tty `---- This makes me wonder if the client shouldn't send some token identifying the protocol version, which would be checked by the server. Ulrich