]> jfr.im git - irc/unrealircd/unrealircd-rpc-php.git/commit - lib/Connection.php
Add streaming JSON-LOG support. Requires UnrealIRCd 6.1.0+
authorBram Matthys <redacted>
Sat, 8 Apr 2023 16:42:51 +0000 (18:42 +0200)
committerBram Matthys <redacted>
Sat, 8 Apr 2023 16:42:51 +0000 (18:42 +0200)
commita3518a0a01aaab2b59db65f211db8bd84cf1441a
treed070e697b5e83dd8ab152e94448ac27c665162d6
parentc6e7dd34de3d34ac1552fed648c24b8e25357a72
Add streaming JSON-LOG support. Requires UnrealIRCd 6.1.0+
(post-rc1 git)

Example:

$rpc->log()->subscribe(Array("!debug","all"));
while(1)
{
    echo "Waiting...\n";
    $res = $rpc->eventloop();
    var_export($res);
    echo "\n";
}

$rpc->eventloop() will return NULL if there is no activity
for 10 seconds, so it is not entirely blocking. You can safely
re-run $rpc->eventloop(); if return value === NULL.
lib/Connection.php
lib/Log.php [new file with mode: 0644]