diff options
author | Valery Piashchynski <[email protected]> | 2020-11-05 17:58:23 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2020-11-05 17:58:23 +0300 |
commit | 9fbe7726dd55cfedda724b7644e1b6bf7c1a6cb4 (patch) | |
tree | f2bf9b97d38103de51e2d140aa76666f9c6341c8 /plugins/app/tests/tcp.php | |
parent | edc45b3e24afdb5e56e74ffbbbd50e0e3b04922b (diff) | |
parent | 73da7300fcc9b8b22faa1c91fc1faff22ab944ff (diff) |
Merge pull request #388 from spiral/enhancement/testsv2.0.0-alpha15
Tests for the new plugins
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 |