From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: [RFC] automatically retrying network connections Date: Mon, 23 Jul 2018 09:41:48 +0200 Message-ID: References: <87sh4dfz8r.fsf@gmail.com> <87bmazfrhf.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1532331598 10804 195.159.176.226 (23 Jul 2018 07:39:58 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 23 Jul 2018 07:39:58 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: Lars Ingebrigtsen , Emacs-Devel devel To: Jimmy Yuen Ho Wong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 23 09:39:54 2018 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 1fhVRi-0002jl-6h for ged-emacs-devel@m.gmane.org; Mon, 23 Jul 2018 09:39:54 +0200 Original-Received: from localhost ([::1]:33172 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhVTp-0000ih-1y for ged-emacs-devel@m.gmane.org; Mon, 23 Jul 2018 03:42:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhVTf-0000iG-93 for emacs-devel@gnu.org; Mon, 23 Jul 2018 03:41:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhVTb-0008JZ-I6 for emacs-devel@gnu.org; Mon, 23 Jul 2018 03:41:55 -0400 Original-Received: from mx2.suse.de ([195.135.220.15]:52046 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fhVTb-0008IE-BE for emacs-devel@gnu.org; Mon, 23 Jul 2018 03:41:51 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Original-Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 4581AADCA; Mon, 23 Jul 2018 07:41:49 +0000 (UTC) X-Yow: .. I think I'll KILL myself by leaping out of this 14th STORY WINDOW while reading ERICA JONG'S poetry!! In-Reply-To: (Jimmy Yuen Ho Wong's message of "Mon, 23 Jul 2018 00:29:15 +0100") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 195.135.220.15 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:227700 Archived-At: On Jul 23 2018, Jimmy Yuen Ho Wong wrote: > On Sun, Jul 22, 2018 at 12:43 PM, Lars Ingebrigtsen wrote: >> Robert Pluim writes: >> >>> (dns-query NAME &optional TYPE FULLP REVERSEP) >>> >>> Query a DNS server for NAME of TYPE. >>> If FULLP, return the entire record returned. >>> If REVERSEP, look up an IP address. >>> >>> which you could use instead of 'nslookup' or 'getaddrinfo' (although >>> 'dns-query' can also punt to 'nslookup', so maybe getaddrinfo is >>> better). >> >> getaddrinfo is probably a lot better. `dns-query' isn't that good at >> retries and the like, if I remember correctly. dns-query can only do a single DNS query, which is unusable for proper address resolution. > He's just pointing out one of the MANY functions in emacs that allows > you to look up an IP address. I've found at least 4, and we now > introducing the 5th and 6th... Address resolution isn't trivial, that's why getaddrinfo exists. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."