VERSION
VERSION = '4.0.19' : string
Version.
BusinessWorker 用于处理Gateway转发来的数据
$id : int
Worker id.
$name : string
Name of the worker processes.
$count : int
Number of worker processes.
$user : string
Unix user of processes, needs appropriate privileges (usually root).
$group : string
Unix group of processes, needs appropriate privileges (usually root).
$reloadable : bool
reloadable.
$reusePort : bool
reuse port.
$onWorkerStart : callable
Emitted when worker processes start.
$onConnect : callable
Emitted when a socket connection is successfully established.
$onMessage : callable
Emitted when data is received.
$onClose : callable
Emitted when the other end of the socket sends a FIN packet.
$onError : callable
Emitted when an error occurs with connection.
$onBufferFull : callable
Emitted when the send buffer becomes full.
$onBufferDrain : callable
Emitted when the send buffer becomes empty.
$onWorkerStop : callable
Emitted when worker processes stoped.
$onWorkerReload : callable
Emitted when worker processes get reload signal.
$transport : string
Transport layer protocol.
$connections : array
Store all connections of clients.
$protocol : string
Application layer protocol.
$stopping : bool
Is worker stopping ?
$daemonize : bool
Daemonize.
$stdoutFile : string
Stdout file.
$pidFile : string
The file to store master process PID.
$logFile : mixed
Log file.
$globalEvent : \Workerman\Events\EventInterface
Global event loop.
$onMasterReload : callable
Emitted when the master process get reload signal.
$onMasterStop : callable
Emitted when the master process terminated.
$eventLoopClass : string
EventLoopClass
$processTitle : string
Process title
$gatewayConnections : array
保存与 gateway 的连接 connection 对象
$registerAddress : string|array
注册中心地址
$eventHandler : string
事件处理类,默认是 Event 类
$processTimeout : int
业务超时时间,可用来定位程序卡在哪里
$processTimeoutHandler : callable
业务超时时间,可用来定位程序卡在哪里
$secretKey : string
秘钥
$sendToGatewayBufferSize : int
businessWorker进程将消息转发给gateway进程的发送缓冲区大小
$_autoloadRootPath : string
Root path for autoload.
$_pauseAccept : bool
Pause accept new connections or not.
$_masterPid : int
The PID of master process.
$_mainSocket : resource
Listening socket.
$_socketName : string
Socket name. The format is like this http://0.0.0.0:80 .
$_localSocket : string
parse from _socketName avoid parse again in master or worker LocalSocket The format is like tcp://0.0.0.0:8080
$_context : resource
Context of socket.
$_workers : \Workerman\Worker[]
All worker instances.
$_pidMap : array
All worker processes pid.
The format is like this [worker_id=>[pid=>pid, pid=>pid, ..], ..]
$_pidsToRestart : array
All worker processes waiting for restart.
The format is like this [pid=>pid, pid=>pid].
$_idMap : array
Mapping from PID to worker process ID.
The format is like this [worker_id=>[0=>$pid, 1=>$pid, ..], ..].
$_status : int
Current status.
$_maxWorkerNameLength : int
Maximum length of the worker names.
$_maxSocketNameLength : int
Maximum length of the socket names.
$_maxUserNameLength : int
Maximum length of the process user names.
$_maxProtoNameLength : int
Maximum length of the Proto names.
$_maxProcessesNameLength : int
Maximum length of the Processes names.
$_maxStatusNameLength : int
Maximum length of the Status names.
$_statisticsFile : string
The file to store status info of current worker process.
$_startFile : string
Start file.
$_OS : string
OS.
$_processForWindows : array
Processes for windows.
$_globalStatistics : array
Status info of current worker process.
$_availableEventLoops : array
Available event loops.
$_builtinTransports : array
PHP built-in protocols.
$_errorType : array
PHP built-in error types.
$_gracefulStop : bool
Graceful stop or not.
$_outputStream : resource
Standard output stream
$_outputDecorated : bool
If $outputStream support decorated
$_onWorkerStart : callable
保存用户设置的 worker 启动回调
$_onWorkerReload : callable
保存用户设置的 workerReload 回调
$_onWorkerStop : callable
保存用户设置的 workerStop 回调
$_registerConnection : \Workerman\Connection\AsyncTcpConnection
到注册中心的连接
$_connectingGatewayAddresses : array
处于连接状态的 gateway 通讯地址
$_gatewayAddresses : array
所有 geteway 内部通讯地址
$_waitingConnectGatewayAddresses : array
等待连接个 gateway 地址
$_eventOnConnect : callable
Event::onConnect 回调
$_eventOnMessage : callable
Event::onMessage 回调
$_eventOnClose : callable
Event::onClose 回调
$_eventOnWebSocketConnect : null
websocket回调
$_sessionVersion : array
SESSION 版本缓存