diff options
author | Valery Piashchynski <[email protected]> | 2020-11-05 16:53:51 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-11-05 16:53:51 +0300 |
commit | 3759df801089973edb1116df69f310aaa2d703dc (patch) | |
tree | 7ca719e281698982181d466cb6fc4f0a0c3f18b2 /plugins/app/tests/tcp.php | |
parent | bca69d968ef76a6260956bc169cb07996fbb7724 (diff) |
Add App tests
Diffstat (limited to 'plugins/app/tests/tcp.php')
-rw-r--r-- | plugins/app/tests/tcp.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/plugins/app/tests/tcp.php b/plugins/app/tests/tcp.php new file mode 100644 index 00000000..2d6fb00a --- /dev/null +++ b/plugins/app/tests/tcp.php @@ -0,0 +1,20 @@ +<?php +/** + * @var Goridge\RelayInterface $relay + */ + +use Spiral\Goridge; +use Spiral\RoadRunner; + +require dirname(__DIR__) . "/../../vendor_php/autoload.php"; + +$relay = new Goridge\SocketRelay("localhost", 9999); +$rr = new RoadRunner\Worker($relay); + +while ($in = $rr->receive($ctx)) { + try { + $rr->send((string)$in); + } catch (\Throwable $e) { + $rr->error((string)$e); + } +}
\ No newline at end of file |