From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Julien Danjou Newsgroups: gmane.emacs.devel Subject: Re: Determining whether a TCP connection is up Date: Sat, 03 Aug 2013 18:01:38 +0200 Message-ID: <87txj64vbx.fsf@dex.adm.naquadah.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1375545730 14968 80.91.229.3 (3 Aug 2013 16:02:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 3 Aug 2013 16:02:10 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 03 18:02:10 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V5eHL-0005tS-SA for ged-emacs-devel@m.gmane.org; Sat, 03 Aug 2013 18:02:03 +0200 Original-Received: from localhost ([::1]:37263 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5eHL-0008IT-Hx for ged-emacs-devel@m.gmane.org; Sat, 03 Aug 2013 12:02:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5eHD-0008I2-4G for emacs-devel@gnu.org; Sat, 03 Aug 2013 12:02:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V5eH6-0004ek-4o for emacs-devel@gnu.org; Sat, 03 Aug 2013 12:01:55 -0400 Original-Received: from prometheus.naquadah.org ([91.121.37.122]:58927 helo=mx1.naquadah.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5eH5-0004e7-Vr for emacs-devel@gnu.org; Sat, 03 Aug 2013 12:01:48 -0400 Original-Received: from dex.adm.naquadah.org (lns-bzn-28-82-250-173-75.adsl.proxad.net [82.250.173.75]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.naquadah.org (Postfix) with ESMTPSA id DD3F0E01FD for ; Sat, 3 Aug 2013 18:01:44 +0200 (CEST) Mail-Followup-To: emacs-devel@gnu.org In-Reply-To: (Lars Magne Ingebrigtsen's message of "Sat, 03 Aug 2013 14:30:33 +0200") User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 91.121.37.122 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:162404 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sat, Aug 03 2013, Lars Magne Ingebrigtsen wrote: > For one, you have to establish reasonable timeouts, but there are none > that can be used generally. For instance, when you send a DELETE > command to an IMAP server, it may take 20 seconds for it to remove the > message and re-create a big folder. You don't want to wait 20 seconds > in general before saying "ok, we have a timeout and should reconnect". In such a case, the other problem is that the connection is going to block Emacs anyway, even for a good reason. Thinking out loud: I think most IMAP clients uses a pool of several connections in the background to deliver actions based on some sort of queue, like delete something or fetch this. Having this would solve partially the problem since if a connection goes AWOL, you just have to wait for the kernel to kill the TCP connection it at some point (which might takes time), but you can continue to create new (working) connections to fulfil the user requests in the meantime, and then requeue the action that timed-out. =2D-=20 Julien Danjou ;; Free Software hacker ; freelance consultant ;; http://julien.danjou.info --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) iQIcBAEBAgAGBQJR/SliAAoJEGEbqVCLeKXCjRIQALqxApArEtAKXCGhd6I/xTsy WCxtmSwJ4iRm/7dUEyZDQdxnUEiPfl2o2dqq08AWm+YgExtOWTQINXRZzd8Pz+j4 EYhdmC4+VFZbfbMopcV472wPC13dM7myDAssPqFB7Jvxr0mpKkK6WM7/jHCqQwww qWmQk/0Al/EajpTHnPp7CMAdjzkf4vzIUJk5slZXAvNWFh47s5ZaJkhsFZrA4J3R Q+lFmhHPwF4zdFNMVEyfy1Aux9symxtr0EID7rmRYMDb4QoMGS9MsLwNF1FpdUHr Ii8mgKwHX7QXaSjA+5YHF42I03tSpsTdkX8a1T3d+t874WIML+E98Uh4B/ZhWxr/ oBquFrWYThcoc/W+HfXBYeupxe7nZVAeyKMp0nU5f2vNIBzZrK4lyd8uWGGreqXE 5u6sDPwgCTJpWOnG2WEXX+m/JRZuy4zqYiZ01bg1BNwoXGamJ1sP/HW3TAgoQcF+ zeJxXEhcDSSKTcgpoYujLpwNAnH98QPL0DxvxDAe36Z/IFKvCbUXpvJtzCbkBAeG yTJkORLBpaZn6dOhXKd6rqnZOLUPiwN72YFxo9HMZ+elZvikgoysKl8yNPE/4MFG doy0EQn9e/OcqfkiOpV6HNYtD1gVP2YTX7Oy7m9zvibLRsKNqcJW5I+b39oeGTC9 7Sg1AkWfO/hVZV1igloZ =/0l3 -----END PGP SIGNATURE----- --=-=-=--