Skip to content

Add TTL in ares_gethostbyname callback #259

@yxue

Description

@yxue

We are using ares_gethostbyname to resolve host names to IP addresses and it works fine. Recently, we want to use record TTL to set DNS query interval in our client side. It looks like there are several options: ares_query, ares_search. We can use ares_parse_a_reply to get the TTL information from the DNS query response.

But when using ares_query and ares_search, some optimizations in ares_gethostbyname are lost. For example, fake_hostent check.

Does the community consider adding TTL in ares_gethostbyname callback or adding a new API?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions