summaryrefslogtreecommitdiff
path: root/tests/error-client.php
blob: 113d1197e0cfcb3b799c31473c15616ce0615813 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php

use Spiral\Goridge;
use Spiral\RoadRunner;

/**
 * echo client over pipes.
 */
ini_set('display_errors', 'stderr');
require "vendor/autoload.php";

$rr = new RoadRunner\Worker(new Goridge\StreamRelay(STDIN, STDOUT));

while ($in = $rr->receive($ctx)) {
    $rr->error((string)$in);
}