v1.7.0
版本发布时间: 2021-06-25 18:55:20
reactphp/dns最新发布版本:v1.13.0(2024-06-13 22:19:21)
-
Feature: Update DNS
Factory
to accept completeConfig
object. Add newFallbackExecutor
and use fallback DNS servers whenConfig
lists multiple servers. (#179 and #180 by @clue)// old (still supported) $config = React\Dns\Config\Config::loadSystemConfigBlocking(); $server = $config->nameservers ? reset($config->nameservers) : '8.8.8.8'; $resolver = $factory->create($server, $loop); // new $config = React\Dns\Config\Config::loadSystemConfigBlocking(); if (!$config->nameservers) { $config->nameservers[] = '8.8.8.8'; } $resolver = $factory->create($config, $loop);