Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#4912 enhancement closed duplicate (duplicate)

Support resolving multiple IP addresses

Reported by: bra Owned by:
Priority: normal Milestone:
Component: core Keywords: dns multiple_ip
Cc: Branch:
Author:

Description

Currently, twisted doesn't support resolving multiple IP addresses for a host name. This patch fixes that by adding an extended option to getHostByName, returning the same value as python's standard socket.gethostbyname_ex. It would be good to support this in the non blocking (non threaded) client too, in twisted.names.client.

Attachments (1)

dns_ex.diff (4.2 KB) - added by bra 6 years ago.
extended dns patch

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by bra

Attachment: dns_ex.diff added

extended dns patch

comment:1 Changed 6 years ago by Jean-Paul Calderone

Resolution: duplicate
Status: newclosed

I think that getaddrinfo is how we'll do this. See #4362.

comment:2 in reply to:  1 Changed 5 years ago by bra

Replying to exarkun:

I think that getaddrinfo is how we'll do this. See #4362.

Cool idea, but if one needs to resolve multiple addresses *now*, what would you recommend? :)

comment:3 Changed 5 years ago by Jean-Paul Calderone

You can call socket.getaddrinfo yourself (in a thread) or use the non-threaded asynchronous APIs provided by twisted.names.client.

Note: See TracTickets for help on using tickets.