unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: emacs-devel@gnu.org
Subject: Re: network process timeouts
Date: Thu, 22 Sep 2016 23:51:21 +0200	[thread overview]
Message-ID: <m3shsrli1y.fsf@gnus.org> (raw)
In-Reply-To: <87lgyju495.fsf@lifelogs.com> (Ted Zlatanov's message of "Thu, 22 Sep 2016 15:24:38 -0400")

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.

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

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

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

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



  reply	other threads:[~2016-09-22 21:51 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 [this message]
2016-09-23 13:03       ` Ted Zlatanov

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=m3shsrli1y.fsf@gnus.org \
    --to=larsi@gnus.org \
    --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).