unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: emacs-devel@gnu.org
Subject: Re: network process timeouts
Date: Fri, 23 Sep 2016 09:03:04 -0400	[thread overview]
Message-ID: <87bmzeu5tj.fsf@lifelogs.com> (raw)
In-Reply-To: m3shsrli1y.fsf@gnus.org

On Thu, 22 Sep 2016 23:51:21 +0200 Lars Ingebrigtsen <larsi@gnus.org> wrote: 

LI> Ted Zlatanov <tzz@lifelogs.com> writes:
>> OK... so I shouldn't bother? Or I'm approaching it wrong? I thought
>> having a timeout in `make-network-process' was the right place for a
>> global timeout per process, and then the underlying implementation can
>> choose what to do with that parameter.

LI> What would the timeout be for?  DNS resolution, socket connection, TLS
LI> negotiation or protocol negotiation?  I think having a parameter for a
LI> timeout for the first three would perhaps be nice if you're programming
LI> synchronous network connection stuff (for instance if you're writing
LI> something to probe hosts to see whether they're listening to a port),
LI> but it's still not quite enough to be generally useful, I think?

If it helps users connecting to network services, I think it's a good
thing, even if it's not everywhere. In this case, I think we can add
setsockopt() and GnuTLS calls to implement some timeouts.

LI> If you look at, for instance, `url-retrieve-synchronously', it does an
LI> asynchronous connection and then loops waiting for it to finish whatever
LI> it's doing.  Adding a timeout to that function would just involve, well,
LI> adding a timeout to that function, and it would not pass that timeout on
LI> to the lower levels.

LI> So in that use case it's not useful, but perhaps you see other use cases
LI> where this is useful?

Yes. Gnus to IMAP/NNTP for instance. Plus we should look at making the
HTTP protocol handlers better with respect to timeouts, I think, but
these are gradual ELisp improvements. The C improvements are the foundation.

Ted




      reply	other threads:[~2016-09-23 13:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-22 12:22 network process timeouts Ted Zlatanov
2016-09-22 12:54 ` Lars Ingebrigtsen
2016-09-22 19:24   ` Ted Zlatanov
2016-09-22 21:51     ` Lars Ingebrigtsen
2016-09-23 13:03       ` Ted Zlatanov [this message]

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=87bmzeu5tj.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --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).