From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Dhruva Krishnamurthy" Newsgroups: gmane.emacs.devel Subject: Re: GNU Emacs: Client/Server Date: Fri, 30 Jan 2004 16:01:12 +0530 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20040130103112.8EF5433@frontend3.messagingengine.com> References: <20040129111259.67CF418B@frontend3.messagingengine.com> <32D82A01-5253-11D8-82BB-00039363E640@swipnet.se> <20040129121313.766CE37D@frontend3.messagingengine.com> <20040130045855.1A6A92E@frontend3.messagingengine.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1075459149 9006 80.91.224.253 (30 Jan 2004 10:39:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 30 Jan 2004 10:39:09 +0000 (UTC) Cc: "Jan D." , Emacs Devel Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Jan 30 11:39:02 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AmW3C-00007A-00 for ; Fri, 30 Jan 2004 11:39:02 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AmW3C-0001eL-00 for ; Fri, 30 Jan 2004 11:39:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AmVwN-0000jx-4D for emacs-devel@quimby.gnus.org; Fri, 30 Jan 2004 05:31:59 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AmVwI-0000jq-Ct for emacs-devel@gnu.org; Fri, 30 Jan 2004 05:31:54 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AmVvm-0000Kn-Fh for emacs-devel@gnu.org; Fri, 30 Jan 2004 05:31:53 -0500 Original-Received: from [66.111.4.25] (helo=out1.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AmVvh-0000JK-Ao for emacs-devel@gnu.org; Fri, 30 Jan 2004 05:31:17 -0500 Original-Received: from frontend3.messagingengine.com (frontend3.internal [10.202.2.152]) by mail.messagingengine.com (Postfix) with ESMTP id B6C2C4CAB89; Fri, 30 Jan 2004 05:31:13 -0500 (EST) Original-Received: by frontend3.messagingengine.com (Postfix, from userid 99) id 8EF5433; Fri, 30 Jan 2004 05:31:12 -0500 (EST) Content-Disposition: inline X-Mailer: MIME::Lite 1.2 (F2.72; T1.001; A1.60; B2.21; Q2.21) Original-To: "Kim F. Storm" X-Sasl-Enc: vBGAi5Uvgl8IW/3KrOSCuw 1075458672 In-Reply-To: X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19563 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19563 On 30 Jan 2004 11:38:14 +0100, "Kim F. Storm" said: > > > > PS: I am not sending this mail to the list, not to annoy people who are > > not interested. > > I don't have all the answers (and questions) on this subject, so it > is ok to CC: emacs-devel. Not a problem. > The problem with your code is how to mix it with code that must ALSO wait > on normal network receive and process output. In your code, you have > two waiting-points (as I understand it:) > > > fResult=GetMailslotInfo(g_CRAMP_Profiler.g_h_mailslot, > > which I assume waits for connections, and > > > fResult=ReadFile(g_CRAMP_Profiler.g_h_mailslot, > > which I assume waits to receive data. Yes. > Both of these must --somehow-- be wrapped in such a way that they > become non-blocking operations and/or will function through the normal This code will be running in it's own thread. So, the main thread is not blocked (am I missing something?). > "select" call which more or less combines all waiting points for async > processing in emacs into one. Actually, I'm not sure select is > "normal" on W32, but that's the interface you need to emulate to add > mail-slot support to emacs'. No idea about that. Never used "select" (used it in PERL). However, I just recalled that MAIL SLOTS in W32 uses UDP internally. So, I am fairly certain now that we can get this working using "make-network-process" in ELisp. I just wrote a very simple ELisp code (has to be simple if I could write it!) to start a server and listen on a port. Another method which establishes a connection if server is running and sends expressions to be evaluated by the server. My gut feeling is that we can easily have a Elisp implementation of basic "gnuserv" functionality atleast to open files on existing GNU Emacs process. Please corect me if I am wrong in my understanding or gross oversights. with warm regards, dhruva ________________________________________ Dhruva Krishnamurthy Proud FSF member: #1935 http://schemer.fateback.com/