EventDnsBase::__construct
(PECL event >= 1.2.6-beta)
EventDnsBase::__construct — Constructs EventDnsBase object
说明
Constructs EventDnsBase object.
参数
-
base -
Event base.
-
initialize -
If
initializeistrue, it attempts to use the underlying operating system defaults to configure the DNS base senibly. If it isfalse, the DNS base is left unconfigured, with no nameservers or options set. In the latter case the DNS base should be configured manually, e.g. with EventDnsBase::parseResolvConf().If
initializeis an integer, it must be one of the following flags:Flag 说明 EventDnsBase::DISABLE_WHEN_INACTIVEDo not prevent the libevent event loop from exiting when we have no active DNS requests. EventDnsBase::INITIALIZE_NAMESERVERSProcess the resolv.conf.EventDnsBase::NAMESERVERS_NO_DEFAULTDo not add default nameserver if there are no nameservers in the resolv.conf.
错误/异常
If initialize has a type other than
int|bool,
a TypeError is thrown.
If the value of initialize is invalid,
a EventException is thrown.
更新日志
| 版本 | 说明 |
|---|---|
| PECL event 3.1.3 |
If initialize has a type other than
int|bool,
a TypeError is thrown.
|
| PECL event 3.1.0RC1 |
The type of the initialize parameter has been changed from bool
to mixed. The value can be either bool (preserving the previous meaning)
or one of the following constants:
EventDnsBase::DISABLE_WHEN_INACTIVE,
EventDnsBase::INITIALIZE_NAMESERVERS,
or EventDnsBase::NAMESERVERS_NO_DEFAULT.
|
用户贡献的备注
备份地址:http://www.lvesu.com/blog/php/eventdnsbase.construct.php