VERSION
VERSION = '3.5.14' : string
Version.
注册中心,用于注册 Gateway 和 BusinessWorker
$globalEvent : \Workerman\Events\EventInterface
Global event loop.
$_workers : array<mixed,\Workerman\Worker>
All worker instances.
getEventLoop() : \Workerman\Events\EventInterface
Get global event-loop instance.
onConnect(\Workerman\Connection\ConnectionInterface $connection) : void
设置个定时器,将未及时发送验证的连接关闭
\Workerman\Connection\ConnectionInterface | $connection |
onMessage(\Workerman\Connection\ConnectionInterface $connection, string $buffer) : void
设置消息回调
\Workerman\Connection\ConnectionInterface | $connection | |
string | $buffer |
onClose(\Workerman\Connection\ConnectionInterface $connection)
连接关闭时
\Workerman\Connection\ConnectionInterface | $connection |
broadcastAddresses(\Workerman\Connection\ConnectionInterface $connection = null)
向 BusinessWorker 广播 gateway 内部通讯地址
\Workerman\Connection\ConnectionInterface | $connection |
forkOneWorkerForLinux(\Workerman\Worker $worker)
Fork one worker process.
\Workerman\Worker | $worker |