From mboxrd@z Thu Jan 1 00:00:00 1970 Path: quimby.gnus.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: New patch for server sockets and datagram (UDP) support. Date: 08 Mar 2002 10:13:56 +0100 Message-ID: <5xpu2fbewb.fsf@kfs2.cua.dk> References: <5xwux64cxe.fsf@kfs2.cua.dk> <5xg03pyyo3.fsf@kfs2.cua.dk> <5xadtvuodz.fsf@kfs2.cua.dk> <200202280408.g1S48QG19264@aztec.santafe.edu> <5xvgchkui4.fsf@kfs2.cua.dk> <200203012123.g21LNvS20494@aztec.santafe.edu> <5xofi1p7cz.fsf_-_@kfs2.cua.dk> <5xg03cprxi.fsf@kfs2.cua.dk> <200203071518.QAA17238@xaital.online-marketwatch.com> <5xvgc8nyw0.fsf@kfs2.cua.dk> <200203071732.SAA17748@xaital.online-marketwatch.com> <5x4rjsylom.fsf@kfs2.cua.dk> <200203080738.IAA21409@xaital.online-marketwatch.com> NNTP-Posting-Host: quimby.gnus.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: quimby.gnus.org 1015578946 3667 80.91.224.244 (8 Mar 2002 09:15:46 GMT) X-Complaints-To: usenet@quimby.gnus.org NNTP-Posting-Date: 8 Mar 2002 09:15:46 GMT Cc: emacs-devel@gnu.org Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16jGTZ-0000x2-00 for ; Fri, 08 Mar 2002 10:15:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16jGT9-00089C-00; Fri, 08 Mar 2002 04:15:19 -0500 Original-Received: from mail.filanet.dk ([195.215.206.179]) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 16jGQv-00081w-00 for ; Fri, 08 Mar 2002 04:13:01 -0500 Original-Received: from kfs2.cua.dk.cua.dk (kfs2.local.filanet.dk [192.168.1.182]) by mail.filanet.dk (Postfix) with SMTP id EC5DE7C047; Fri, 8 Mar 2002 09:12:53 +0000 (GMT) Original-To: Helmut Eller In-Reply-To: <200203080738.IAA21409@xaital.online-marketwatch.com> Original-Lines: 83 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: quimby.gnus.org gmane.emacs.devel:1800 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:1800 Helmut Eller writes: > storm@cua.dk (Kim F. Storm) writes: > > > > :nowait BOOL -- Don't wait for client process to complete the > > connection to the server if BOOL is non-nil; instead, the sentinel > > function will be called with second matching "open" (if successful) or > > "failed" when the connect completes. Default is to use a blocking > > connect. > > I would prefer :wait that defaults to t. Is shorter and avoids the > negation. Since we will normally use this through wrappers -- and there is really only one usage which does actually wait (corresponsing to the old, blocking open-network-stream), it makes more sense to have a :wait key with default nil. I'll change that. > > > Notice that the FILTER and SENTINEL args are never used directly by > > the server process. Also, the BUFFER argument is not used directly by > > the server process, but via `network-server-log-function' hook, a log > > of the accepted (and failed) connections may be recorded in the server > > process' buffer. > > network-server-log-function is a global variable. This may cause > problems when used by independent packages. Is it a problem to make > this an attribute of the server process? E.g. as :log-function > argument? > I actually didn't expect any `packages' as such to use this, as I just intended it to be a way to trace/debug connectivity problems. But I agree that it would be cleaner to add it per-connection via a :log argument. I'll think about that... > > The following special call returns t iff a given KEY VALUE > > pair is supported on this system: > > (make-network-process :feature KEY VALUE) */) > > Hmm... this looks a bit strange. Can you give some examples? > Especially, what do you supply as VALUE? > It simply tests whether using KEY VALUE as arguments to make-network-stream is supported, e.g. :datagram t, :nowait t, :family 'local. > > > Because there is currently no way to get the IP address(es) of the > > > current host. It MAY also simplify the C level implementation, > > > because you could require that e.g. the SERVICE argument is actually a > > > port number and not a string or a number; similar for the HOST > > > argument. > > > > > I don't think this is necessary, so I'll leave that for a future > > enhancement. To restrict connections to the local host, I suggest > > using either "localhost" for the HOST or as local (UNIX) socket. > > It was indented to implement protocols like DCC. But it is better to > leave this for the feature. Yes! I think I'm trying to cope with enough new functionality here :-) > > > Ok, but as you mention yourself, this is the exception, so it > > shouldn't be the standard behaviour. I will take a look at using > > stop-process and start-process to temporarily inhibit a server socket > > from accepting connections. If you can use stop-process in > > the sentinel, this seems to be a cleaner solution than > > having to (re-)enable the server by calling accept-connection. > > OK. I will not bother you again :-) Actually, I will make `:wait t' work for a server socket -- that will allow you to start the server in the stopped state. > > Thanks for all your work, Kim. Thank you for your initial work on this, as well as your valuable feedback, Helmut! -- Kim F. Storm http://www.cua.dk _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel