summaryrefslogtreecommitdiff
path: root/tests/head.php
blob: 3c57258f1bf2683f0f527626d32f321119da11e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
/**
 * @var Goridge\RelayInterface $relay
 */

use Spiral\Goridge;
use Spiral\RoadRunner;

$rr = new RoadRunner\Worker($relay);

while ($in = $rr->waitPayload()) {
    try {
        $rr->send("", (string)$in->header);
    } catch (\Throwable $e) {
        $rr->error((string)$e);
    }
}