EventDnsBase
final class EventDnsBase (View source)
EventDnsBase.
Represents Libevent's DNS base structure. Used to resolve DNS asyncronously, parse configuration files like resolv.conf etc.
Constants
OPTION_SEARCH |
|
OPTION_NAMESERVERS |
|
OPTION_MISC |
|
OPTION_HOSTSFILE |
|
OPTIONS_ALL |
|
Methods
addNameserverIp.
addSearch.
clearSearch.
countNameservers.
loadHosts.
parseResolvConf.
setOption.
setSearchNdots.
Details
__construct(EventBase $base, bool $initialize)
__construct.
Constructs EventDnsBase object.
bool
addNameserverIp(string $ip)
addNameserverIp.
Adds a nameserver to the DNS base.
void
addSearch(string $domain)
addSearch.
Adds a domain to the list of search domains.
void
clearSearch()
clearSearch.
Removes all current search suffixes.
int
countNameservers()
countNameservers.
Gets the number of configured nameservers.
bool
loadHosts(string $hosts)
loadHosts.
Loads a hosts file (in the same format as /etc/hosts) from hosts file.
bool
parseResolvConf(int $flags, string $filename)
parseResolvConf.
Scans the resolv.conf-formatted file.
bool
setOption(string $option, string $value)
setOption.
Set the value of a configuration option.
void
setSearchNdots(int $ndots)
setSearchNdots.
Set the 'ndots' parameter for searches.