Join 4,000+ others and never miss out on new tips, tutorials, and more.
Latest version:
pecl install openswoole-22.1.2 | composer require openswoole/core:22.1.5
<?php OpenSwoole\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
OpenSwoole\Server::POOL_MODE
mode, calling this method may still allow some data to be received before it is actually paused, which could trigger the onReceive
eventOpenSwoole\Server::SIMPLE_MODE
modeCheckout resume for how to restart the client connection.