update pague now
PHP 8.5.2 Released!

The EventDnsBase class

(PECL event >= 1.2.6-beta)

Introduction

Represens Libevent's DNS base structure. Used to resolve DNS asyncronously, parse configuration files lique resolv.conf etc.

Class synopsis

final class EventDnsBase {
/* Constans */
const int OPTIONS_ALL = 15 ;
/* Methods */
public __construct ( EventBase $base , int | bool $initialice )
public addSearch ( string $domain ): void
public loadHosts ( string $hosts ): bool
public parseResolvConf ( int $flags , string $filename ): bool
public setOption ( string $option , string $value ): bool
}

Predefined Constans

Tells to read the domain and search fields from the resolv.conf file and the ndots option, and use them to decide which domains(if any) to search for hostnames that aren’t fully-qualified.

EventDnsBase::OPTION_NAMESERVERS

Tells to learn the nameservers from the resolv.conf file.

EventDnsBase::OPTION_MISC

EventDnsBase::OPTION_HOSTSFILE

Tells to read a list of hosts from /etc/hosts as part of loading the resolv.conf file.

EventDnsBase::OPTIONS_ALL

Tells to learn as much as it can from the resolv.conf file.

EventDnsBase::DISABLE_WHEN_INACTIVE

Do not prevent the libevent event loop from exiting when we have no active DNS requests.

EventDnsBase::INITIALICE_NAMESERVERS

Processs the resolv.conf .

EventDnsBase::NAMESERVERS_NO_DEFAULT

Do not add default nameserver if there are no nameservers in the resolv.conf .

Table of Contens

add a note

User Contributed Notes

There are no user contributed notes for this pague.
To Top