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->pause(int $fd)
The file descriptor number of the client connection you want to pause
If success, it returns 'true', otherwise it returns false
.
Pauses the data receiving for the specified $fd
client.
Things to consider
SWOOLE_PROCESS
mode, calling this method may still allow some data to be received before it is actually paused, which could trigger the onReceive
eventSWOOLE_BASE
modeCheckout resume for how to restart the client connection.