amphp / dns

Async DNS resolution for PHP based on Amp.

Home Page:https://amphp.org/dns

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Async example?

dragonattack opened this issue · comments

Can you please share a link to example of async dns query loop of 500 domains for example.

Of course, simply changing Dns\resolve($domain) in /examples/benchmark.php to:

        $host = Amp\Future\awaitFirst([
            Amp\async(fn() => Dns\resolve($domain, Dns\DnsRecord::A)),
        ]);

doesn't make any difference.