![image](https://user-images.githubusercontent.com/45587738/182279814-651a1636-8f30-47f3-bead-273cf65794cd.png)

{
        in6_addr addr;
        inet_pton(AF_INET6, ip.c_str(), &addr);
        ares_gethostbyaddr(channel, reinterpret_cast<const void*>(&addr), sizeof(addr), AF_INET6, callback, &response);
    }
    void CaresPTRResolver::wait()
    {
        timeval * tvp, tv;
        fd_set read_fds;
        fd_set write_fds;
        int nfds;
        for (;;)
        {
            FD_ZERO(&read_fds);
            FD_ZERO(&write_fds);
            nfds = ares_fds(channel, &read_fds,&write_fds);
            if (nfds == 0)
            {
                break;
            }
            tvp = ares_timeout(channel, nullptr, &tv);
            select(nfds, &read_fds, &write_fds, nullptr, tvp);
            ares_process(channel, &read_fds, &write_fds);
        }
    }
}