« EventBase::free
EventBase::getMethod »

EventBase::getFeatures

(PECL event >= 1.2.6-beta)

EventBase::getFeatures — Returns bitmask of features supported

説明

public function EventBase::getFeatures(): int

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/deleting events\n";
($features & EventConfig::FEATURE_FDS) and print "FDS - arbitrary file descriptor types, and not just sockets\n";
?>

参考

関連キーワード:
features   EventBase   EventConfig   bitmask   supported   getFeatures   method   print   getMethod   event   base   free   beta   integer   representing   constants   example   Avoiding   avoidMethod   avoided   Features   edge   triggered   operation   adding
関連する関数・ページ:
eventbase.getmethod   eventbase.construct   eventconfig.setflags   eventconfig.construct   function.rnp-supported-features   eventbase.free