Join 4,000+ others and never miss out on new tips, tutorials, and more.
4.x is outdated, please check the latest version 22.x
Latest version:
pecl install openswoole-22.1.2
<?php Swoole\Server->on('ManagerStop', Callable $callback)
The event callback name.
Callable event function.
If success, it returns true
, otherwise it returns false
.
Execute the callback function when the Manager Process in the Server is stopped.
The callback function registered for event ManagerStop
is executed in the manager process.
When this event is triggered, all worker and task worker process have already been stopped and finished running.
<?php
$server->on('ManagerStop', function(Swoole\Server $server)
{
// ...
});