首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

EventBase::getFeatures

(PECL event >= 1.2.6-beta)

EventBase :: getFeatures - 返回支持的功能的位掩码

描述

代码语言:javascript
复制
public int EventBase::getFeatures ( void )

返回支持的功能的位掩码。

参数

该功能没有参数。

返回值

返回表示支持的要素的位掩码的整数。请参阅EventConfig :: FEATURE_ *常量。

例子

示例#1 EventBase :: getFeatures()示例

代码语言:javascript
复制
<?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");
?>

扫码关注腾讯云开发者

领取腾讯云代金券