mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-23 16:45:35 +08:00
Update global_functions.php
This commit is contained in:
@@ -288,16 +288,15 @@ function bot() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAllFdByConnectType(string $type = 'default'): array
|
/**
|
||||||
{
|
* 获取同类型所有连接的文件描述符 ID
|
||||||
$fd = [];
|
* @author 854854321
|
||||||
foreach (ManagerGM::getAllByName($type) as $ConnectionObjectObj) {
|
* @return array
|
||||||
array_push($fd, $ConnectionObjectObj->getFd());
|
*/
|
||||||
|
function getAllFdByConnectType(string $type = 'default'): array {
|
||||||
|
$fds = [];
|
||||||
|
foreach (ManagerGM::getAllByName($type) as $obj) {
|
||||||
|
array_push($fd, $obj->getFd());
|
||||||
}
|
}
|
||||||
return $fd;
|
return $fds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user