Join 4,000+ others and never miss out on new tips, tutorials, and more.
Latest version:
pecl install openswoole-25.2.0 | composer require openswoole/core:22.1.5
<?php OpenSwoole\WebSocket\Server->on('Disconnect', callable $callback)
The event name to set a callback for
Callable function for the server event type
If success, it returns true
, otherwise it returns false
This function is executed when a WebSocket connection is closed, this could be either by the client or server.
You are not required to register this callback event.
Since v4.7.0