From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: network process timeouts Date: Fri, 23 Sep 2016 09:03:04 -0400 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87bmzeu5tj.fsf@lifelogs.com> References: <87wpi4azuf.fsf@lifelogs.com> <87lgyju495.fsf@lifelogs.com> Reply-To: emacs-devel@gnu.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1474635882 12057 195.159.176.226 (23 Sep 2016 13:04:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 23 Sep 2016 13:04:42 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 23 15:04:34 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bnQ9X-0001k0-Re for ged-emacs-devel@m.gmane.org; Fri, 23 Sep 2016 15:04:31 +0200 Original-Received: from localhost ([::1]:45868 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnQ9W-0001Gg-1r for ged-emacs-devel@m.gmane.org; Fri, 23 Sep 2016 09:04:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58796) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnQ8c-0001Ai-J4 for emacs-devel@gnu.org; Fri, 23 Sep 2016 09:03:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnQ8S-0002VN-I1 for emacs-devel@gnu.org; Fri, 23 Sep 2016 09:03:34 -0400 Original-Received: from [195.159.176.226] (port=53515 helo=blaine.gmane.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnQ8S-0002UH-BM for emacs-devel@gnu.org; Fri, 23 Sep 2016 09:03:24 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1bnQ8G-0001zk-Ob for emacs-devel@gnu.org; Fri, 23 Sep 2016 15:03:12 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 33 Original-X-Complaints-To: usenet@blaine.gmane.org X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never Cancel-Lock: sha1:tMLKztySQtrBN5yrcKP9nIoiuZY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:207726 Archived-At: On Thu, 22 Sep 2016 23:51:21 +0200 Lars Ingebrigtsen wrote: LI> Ted Zlatanov 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