Executors are the foundation of the DNS component, performing any DNS query and returning the full results of that query. Resolvers and connectors depend on executors to perform the DNS query required for their operation.
Executor::execute( string $domain, string|int $type, mixed $options =  ): \Generator
Executes a DNS query.
An executor will retry a query a number of times if it doesn't receive a response within
timeout seconds. The number of times a query will be retried before failing is defined by
timeout seconds elapsing between each query attempt.
Coroutine: Calls to this function must be preceded with
yield within another coroutine or wrapped with
new Coroutine() to create an awaitable.
- Domain name.
- Query type (e.g.,
mixed $options = 
An array of additional options.
Option Type Description
Timeout until query fails. Default is 2 seconds.
Number of times to attempt the query before failing. Default is 5 times.
- Response message.
- If sending the request or parsing the response fails.
- If the server returns a non-zero response code or no response is received from the server.