code: public static function buildDnsResolver(
          LoopInterface $loop,
          $dns = '8.8.8.8'
      ) {
          $factory = new DnsResolverFactory();
  
          return $factory->createCached($dns, $loop);
      }
docs: Build a React Dns Resolver.
  
  @param LoopInterface $loop
  @param string        $dns
  
  @return DnsResolver