Join 4,000+ others and never miss out on new tips, tutorials, and more.
pecl install openswoole-22.0.0 | composer require openswoole/core:22.1.2
Whether to close any detected timed out connections based on the server configuration options that are set.
If successful, an array of closed connection
fds are returned, otherwise if something went wrong or no connections are closed/found
false is returned instead.
This method is difference from the
heartbeat_check_interval server configuration, which is passive. The
heartbeat method actively checks all connections to see if they have exceeded the agreed heartbeat timeout set within the server configuration options.
By default, calling this method will close any idle connections but you can disable this by passing
<?php $closeFdArrary = $server->heartbeat(); var_dump($closeFdArrary);