Swoole\Server->on('ManagerStop', fn)

4.x is outdated, please check the latest version 22.x


Latest version: pecl install openswoole-22.1.2

Declaration

<?php Swoole\Server->on('ManagerStop', Callable $callback)

Parameters

event

The event callback name.

callback

Callable event function.

Return

success

If success, it returns true, otherwise it returns false.

Description

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.

Example

<?php
$server->on('ManagerStop', function(Swoole\Server $server)
{
  // ...
});
Last updated on August 31, 2022