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->getReceivedTime()
none
The last time the server received data.
Get the last timestamp that the server received data.
<?php
$server->on('receive', function ($server, $fd, $reactorId, $data)
{
usleep(rand(100000, 2000000));
var_dump(round($server->getReceivedTime(), 10));
});