Opened 4 years ago

Closed 4 years ago

Last modified 2 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: Launchpad Bug:

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 4 years ago.
extended dns patch

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by bra

extended dns patch

comment:1 follow-up: Changed 4 years ago by exarkun

  • Resolution set to duplicate
  • Status changed from new to closed

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

comment:2 in reply to: ↑ 1 Changed 2 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 2 years ago by exarkun

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.