paulc / dnslib

A Python library to encode/decode DNS wire-format packets
https://github.com/paulc/dnslib
BSD 2-Clause "Simplified" License
299 stars 85 forks source link

Add ttl to DNSRecord.send #1

Closed matthewfranglen closed 10 years ago

matthewfranglen commented 10 years ago

This is based on the work done for the stackoverflow question:

http://stackoverflow.com/q/24855168/170865

This adds a ttl argument to the send which can be set to prevent the request blocking indefinitely.

I am probably misusing the ttl name, so if that is inappropriate please let me know.

paulc commented 10 years ago

I have added a timeout parameter to send - note settimeout(0) is different to settimeout(None) so added test for this

Note that that the master version of the repository is on BitBucket so can't easily merge pull requests/issues from GitHub.