unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: New patch for server sockets and datagram (UDP) support.
Date: 08 Mar 2002 10:13:56 +0100	[thread overview]
Message-ID: <5xpu2fbewb.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <200203080738.IAA21409@xaital.online-marketwatch.com>

Helmut Eller <helmut@xaital.km4u.net> 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 <storm@cua.dk> http://www.cua.dk


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


  reply	other threads:[~2002-03-08  9:13 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m2u1sa7819.fsf@xaital.online-marketwatch.com>
2002-02-21 23:45 ` Non-blocking open-network-stream Kim F. Storm
2002-02-22 16:04   ` Stefan Monnier
2002-02-25 22:38   ` Kim F. Storm
2002-02-26 22:46     ` Helmut Eller
2002-02-27 11:59       ` Kim F. Storm
2002-02-28  4:08         ` Richard Stallman
2002-03-01  0:21           ` Kim F. Storm
2002-03-01  8:01             ` Juanma Barranquero
2002-03-01 10:50               ` Kim F. Storm
2002-03-01 17:10                 ` Pavel Janík
2002-03-01 21:23             ` Richard Stallman
2002-03-07  0:08               ` New patch for server sockets and datagram (UDP) support Kim F. Storm
2002-03-07 10:56                 ` Kim F. Storm
2002-03-07 11:39                   ` Alex Schroeder
2002-03-07 12:39                     ` Kim F. Storm
2002-03-07 14:51                       ` Alex Schroeder
2002-03-08 21:06                       ` Richard Stallman
2002-03-13 15:56                         ` Kim F. Storm
2002-03-13 23:19                           ` Final(?) " Kim F. Storm
2002-03-14  0:50                             ` Al Petrofsky
2002-03-14  9:30                               ` Kim F. Storm
2002-03-14 12:42                               ` Richard Stallman
2002-03-14 13:35                                 ` Kim F. Storm
2002-03-17 22:02                             ` I have installed the " Kim F. Storm
2002-03-07 15:18                   ` New " Helmut Eller
2002-03-07 16:09                     ` Kim F. Storm
2002-03-07 17:32                       ` Helmut Eller
2002-03-07 23:58                         ` Kim F. Storm
2002-03-08  7:38                           ` Helmut Eller
2002-03-08  9:13                             ` Kim F. Storm [this message]
2002-03-08 11:16                               ` Helmut Eller
2002-03-08 16:36                               ` Stefan Monnier
2002-03-08 20:57                                 ` Kim F. Storm
2002-03-08 21:03                                   ` Stefan Monnier
2002-03-08 21:07                             ` Richard Stallman
2002-03-13 15:12                               ` Kim F. Storm
2002-03-07 12:54                 ` Mario Lang
2002-03-07 12:58                   ` Kim F. Storm
2002-03-08  9:09                 ` Richard Stallman
2002-03-08  9:35                   ` Kim F. Storm
2002-03-08 11:04                   ` Helmut Eller
2002-03-02  7:59             ` Non-blocking open-network-stream Helmut Eller
2002-03-03  0:12               ` Kim F. Storm
2002-03-03 10:46                 ` Helmut Eller
2002-03-03 16:44                 ` Mario Lang
2002-03-03 14:39               ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5xpu2fbewb.fsf@kfs2.cua.dk \
    --to=storm@cua.dk \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).