From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.devel Subject: Re: w32 does not have emacsclient/server Date: Wed, 27 Jul 2005 16:45:25 +0100 Message-ID: <42E7AC15.1000503@gnu.org> References: <42D75F2C.3040303@student.lu.se> <85zmso79mt.fsf@lola.goethe.zz> <42D7AA3E.7040508@student.lu.se> <42D7C92E.2020100@gnu.org> <42D7CDAA.4070400@student.lu.se> <85zmsorthl.fsf@lola.goethe.zz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1122479240 20946 80.91.229.2 (27 Jul 2005 15:47:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 27 Jul 2005 15:47:20 +0000 (UTC) Cc: Stefan Monnier , Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 27 17:47:11 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dxo6Q-0003Ff-6A for ged-emacs-devel@m.gmane.org; Wed, 27 Jul 2005 17:45:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dxo8p-0005xI-2O for ged-emacs-devel@m.gmane.org; Wed, 27 Jul 2005 11:48:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dxo6i-0005HU-1z for emacs-devel@gnu.org; Wed, 27 Jul 2005 11:46:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dxo6a-0005BX-Iu for emacs-devel@gnu.org; Wed, 27 Jul 2005 11:46:00 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dxo6Y-0004tc-VA for emacs-devel@gnu.org; Wed, 27 Jul 2005 11:45:59 -0400 Original-Received: from [217.207.198.106] (helo=exchange.integrasp.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DxoF9-0003u6-Fa for emacs-devel@gnu.org; Wed, 27 Jul 2005 11:54:51 -0400 Original-Received: from ASSP-nospam (localhost [127.0.0.1]) by exchange.integrasp.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id 37Q0TCC8; Wed, 27 Jul 2005 16:40:45 +0100 Original-Received: from 10.10.5.77 ([10.10.5.77] helo=[10.10.5.77]) by ASSP-nospam ; 27 Jul 05 15:40:45 -0000 User-Agent: Mozilla Thunderbird 1.0.5 (Windows/20050711) X-Accept-Language: en-us, en Original-To: Juanma Barranquero In-Reply-To: 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:41246 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41246 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.