This so keepalive-like packets can be sent to the browser by the webpanel
every 2 seconds instead of 10 seconds (for better explanation see webpanel)
*/
public function eventloop(): object|array|bool|null
{
+ $this->connection->setTimeout(2); /* lower timeout for socket loop */
$starttime = microtime(true);
try {
$reply = $this->connection->receive();
return NULL;
}
+ $this->connection->setTimeout(10); /* set timeout back again */
+
$reply = json_decode($reply);
if (property_exists($reply, 'result')) {