VERSION
VERSION = '3.5.14' : string
Version.
BusinessWorker 用于处理Gateway转发来的数据
$globalEvent : \Workerman\Events\EventInterface
Global event loop.
$_workers : array<mixed,\Workerman\Worker>
All worker instances.
$_registerConnection : \Workerman\Connection\AsyncTcpConnection
到注册中心的连接
getEventLoop() : \Workerman\Events\EventInterface
Get global event-loop instance.
onGatewayMessage(\Workerman\Connection\TcpConnection $connection, mixed $data)
当 gateway 转发来数据时
\Workerman\Connection\TcpConnection | $connection | |
mixed | $data |
onGatewayClose(\Workerman\Connection\TcpConnection $connection) : void
当与 Gateway 的连接断开时触发
\Workerman\Connection\TcpConnection | $connection |
onConnectGateway(\Workerman\Connection\TcpConnection $connection) : void
当连接上 gateway 的通讯端口时触发 将连接 connection 对象保存起来
\Workerman\Connection\TcpConnection | $connection |
onGatewayError(\Workerman\Connection\TcpConnection $connection, integer $error_no, string $error_msg)
当与 gateway 的连接出现错误时触发
\Workerman\Connection\TcpConnection | $connection | |
integer | $error_no | |
string | $error_msg |
forkOneWorkerForLinux(\Workerman\Worker $worker)
Fork one worker process.
\Workerman\Worker | $worker |
onWorkerReload(\Workerman\Worker $worker)
onWorkerReload 回调
\Workerman\Worker | $worker |