emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: network process timeouts


From: Lars Ingebrigtsen
Subject: Re: network process timeouts
Date: Thu, 22 Sep 2016 23:51:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Ted Zlatanov <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]