Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #33346
| From | roy@panix.com (Roy Smith) |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Subprocess puzzle and two questions |
| Date | 2012-11-14 11:20 -0500 |
| Organization | PANIX -- Public Access Networks Corp. |
| Message-ID | <k80gd6$t0q$1@panix2.panix.com> (permalink) |
| References | <mailman.3664.1352867713.27098.python-list@python.org> <mailman.3666.1352873042.27098.python-list@python.org> <roy-F5C640.09225714112012@news.panix.com> <mailman.3684.1352904008.27098.python-list@python.org> |
I wrote:
>> Oh, my. You're using DNS as a replacement for ping? Fair enough. In
>> that case, all you really care about is that you can connect to port 53
>> on the server...
>>
>> s = socket.socket()
>> s.connect(('8.8.8.8', 53))
In article <mailman.3684.1352904008.27098.python-list@python.org>,
Chris Angelico <rosuav@gmail.com> wrote:
>That assumes that (a) the remote server supports TCP for DNS
This is true. I honestly don't know what percentage of DNS servers
out there only support UDP. The two I tried (Google's 8.8.8.8, and my
Apple TimeCapsule) both supported TCP, but that's hardly a
representitive sample.
> and (b) that connection time for TCP is comparable to
> ping or an actual DNS lookup.
My first thought to solve both of these is that it shouldn't be too
hard to hand-craft a minimal DNS query and send it over UDP. Then, I
hunted around a bit and found that somebody had already done that, in
spades. Take a look at http://www.dnspython.org; it might be exactly
what's needed here.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Subprocess puzzle and two questions wrw@mac.com - 2012-11-13 22:34 -0500
Re: Subprocess puzzle and two questions Roy Smith <roy@panix.com> - 2012-11-13 23:41 -0500
Re: Subprocess puzzle and two questions William Ray Wing <wrw@mac.com> - 2012-11-14 00:03 -0500
Re: Subprocess puzzle and two questions Roy Smith <roy@panix.com> - 2012-11-14 09:22 -0500
Re: Subprocess puzzle and two questions Chris Angelico <rosuav@gmail.com> - 2012-11-15 01:40 +1100
Re: Subprocess puzzle and two questions roy@panix.com (Roy Smith) - 2012-11-14 11:20 -0500
Re: Subprocess puzzle and two questions Chris Angelico <rosuav@gmail.com> - 2012-11-15 08:54 +1100
Re: Subprocess puzzle and two questions Roy Smith <roy@panix.com> - 2012-11-14 20:49 -0500
Re: Subprocess puzzle and two questions Chris Angelico <rosuav@gmail.com> - 2012-11-15 13:04 +1100
Re: Subprocess puzzle and two questions Roy Smith <roy@panix.com> - 2012-11-14 21:10 -0500
Re: Subprocess puzzle and two questions Chris Angelico <rosuav@gmail.com> - 2012-11-15 13:21 +1100
Re: Subprocess puzzle and two questions Dave Angel <d@davea.name> - 2012-11-14 21:55 -0500
Re: Subprocess puzzle and two questions Kushal Kumaran <kushal.kumaran+python@gmail.com> - 2012-11-15 10:23 +0530
Re: Subprocess puzzle and two questions Nobody <nobody@nowhere.com> - 2012-11-15 22:54 +0000
Re: Subprocess puzzle and two questions Roy Smith <roy@panix.com> - 2012-11-15 20:07 -0500
Re: Subprocess puzzle and two questions Nobody <nobody@nowhere.com> - 2012-11-17 00:17 +0000
DNS from Python (was Re: Subprocess puzzle and two questions) aahz@pythoncraft.com (Aahz) - 2012-11-14 21:42 -0800
Re: Subprocess puzzle and two questions wrw@mac.com - 2012-11-14 09:37 -0500
Re: Subprocess puzzle and two questions Tim Roberts <timr@probo.com> - 2012-11-13 23:17 -0800
csiph-web