From mboxrd@z Thu Jan 1 00:00:00 1970 Path: quimby.gnus.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: New patch for server sockets and datagram (UDP) support. Date: Fri, 8 Mar 2002 08:38:55 +0100 Message-ID: <200203080738.IAA21409@xaital.online-marketwatch.com> 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> Reply-To: Helmut Eller NNTP-Posting-Host: quimby.gnus.org X-Trace: quimby.gnus.org 1015573177 32094 80.91.224.244 (8 Mar 2002 07:39:37 GMT) X-Complaints-To: usenet@quimby.gnus.org NNTP-Posting-Date: 8 Mar 2002 07:39:37 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 16jEyX-0008LY-00 for ; Fri, 08 Mar 2002 08:39:37 +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 16jEy3-0001nP-00; Fri, 08 Mar 2002 02:39:07 -0500 Original-Received: from 212186011228.11.tuwien.teleweb.at ([212.186.11.228] helo=xaital.online-marketwatch.com) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16jExv-0001mu-00 for ; Fri, 08 Mar 2002 02:38:59 -0500 Original-Received: (from helmut@localhost) by xaital.online-marketwatch.com (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id IAA21409; Fri, 8 Mar 2002 08:38:55 +0100 X-Authentication-Warning: xaital.online-marketwatch.com: helmut set sender to e9626484@stud3.tuwien.ac.at using -f Original-To: storm@cua.dk In-reply-to: <5x4rjsylom.fsf@kfs2.cua.dk> (storm@cua.dk) 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:1791 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:1791 storm@cua.dk (Kim F. Storm) writes: > Below is the doc-string for make-network-process which is a keyword > based replacement for the built-in open-network-stream. I already > implemented most of the code handling this, and it looks quite clean > compared to the previous version. > > IMO, this it by far the best proposal for the API so far. Yes. This looks very good now. > :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. > 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? > 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? > > 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. > 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 :-) Thanks for all your work, Kim. Helmut. _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel