[MOD] add global function -> getAllFdByConnectType 根据连接类型获取所有fd.

This commit is contained in:
wenhao 2020-12-25 15:48:41 +08:00
parent aae79aacb5
commit 86a0e1a2ca

View File

@ -288,6 +288,16 @@ function bot() {
}
}
function getAllFdByConnectType(string $type = 'default'): array
{
$fd = [];
foreach (ManagerGM::getAllByName($type) as $ConnectionObjectObj) {
array_push($fd, $ConnectionObjectObj->getFd());
}
return $fd;
}