EventBase::getFeatures
(PECL event >= 1.2.6-beta)
EventBase::getFeatures — Returns bitmask of features supported
Описание
public
int
EventBase::getFeatures
( void
)
Returns bitmask of features supported.
Список параметров
У этой функции нет параметров.
Возвращаемые значения
Returns integer representing a bitmask of supported features. See EventConfig::FEATURE_* constants .
Примеры
Пример #1 EventBase::getFeatures() example
<?php
// Avoiding "select" method
$cfg = new EventConfig();
if ($cfg->avoidMethod("select")) {
echo "`select' method avoided\n";
}
$base = new EventBase($cfg);
echo "Features:\n";
$features = $base->getFeatures();
($features & EventConfig::FEATURE_ET) and print("ET - edge-triggered IO\n");
($features & EventConfig::FEATURE_O1) and print("O1 - O(1) operation for adding/deletting events\n");
($features & EventConfig::FEATURE_FDS) and print("FDS - arbitrary file descriptor types, and not just sockets\n");
?>
Смотрите также
- EventBase::getMethod() - Returns event method in use
- EventConfig
- Функция EventBase::__construct() - Constructs EventBase object
- Функция EventBase::dispatch() - Dispatch pending events
- Функция EventBase::exit() - Stop dispatching events
- EventBase::free
- Функция EventBase::getFeatures() - Returns bitmask of features supported
- Функция EventBase::getMethod() - Returns event method in use
- Функция EventBase::getTimeOfDayCached() - Returns the current event base time
- Функция EventBase::gotExit() - Checks if the event loop was told to exit
- Функция EventBase::gotStop() - Checks if the event loop was told to exit
- Функция EventBase::loop() - Dispatch pending events
- Функция EventBase::priorityInit() - Sets number of priorities per event base
- Функция EventBase::reInit() - Re-initialize event base(after a fork).
- Функция EventBase::stop() - Tells event_base to stop dispatching events
Коментарии
404 Not Found