{"repo":"reactphp/dns","free":true,"listed":false,"github":"https://github.com/reactphp/dns","clone":"git clone https://github.com/reactphp/dns.git","description":"Async DNS resolver for ReactPHP.","language":"PHP","stars":540,"topics":["php","reactphp","dns"],"license":"MIT","category":"networking-infra","readme_excerpt":"DNS Async DNS resolver for ReactPHP. Development version: This branch contains the code for the upcoming v3 release. For the code of the current stable v1 release, check out the 1.x branch. The upcoming v3 release will be the way forward for this package. However, we will still actively support v1 for those not yet on the latest version. See also installation instructions for more details. The main point of the DNS component is to provide async DNS resolution. However, it is really a toolkit for working with DNS messages, and could easily be used to create a DNS server. Table of contents Basic usage Caching Custom cache adapter ResolverInterface resolve() resolveAll() Advanced usage UdpTransportExecutor TcpTransportExecutor SelectiveTransportExecutor HostsFileExecutor Install Tests License References Basic usage The most basic usage is to just create a resolver through the resolver factory. All you need to give it is a nameserver, then you can start resolving names, baby! See also the first example. The Config class can be used to load the system default config. This is an operation that may access the filesystem and block. Ideally, this method should thus be executed only once before the loop starts and not repeatedly while it is running. Note that this class may return an empty configuration if the system config can not be loaded. As such, you'll likely want to apply a default nameserver as above if none can be found. Note that the factory loads the hosts file from the file","default_branch":null,"files":null,"tree":[],"storefront":"/r/reactphp","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/reactphp/dns/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}