summaryrefslogtreecommitdiff
path: root/plugins/server
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-12-15 13:31:40 +0300
committerGitHub <[email protected]>2020-12-15 13:31:40 +0300
commitb44d272312389691920e42e5295395bef0d3b769 (patch)
tree1c826999423e59db5b7dab1184725e22468ecfbd /plugins/server
parent673da74925dee5c62064d3304289ae81cb499217 (diff)
parent7b0a6720c21056ed4b922eb5b1b8a91a44dc3638 (diff)
Merge pull request #447 from spiral/feature/goridge3
Feature/goridge3
Diffstat (limited to 'plugins/server')
-rw-r--r--plugins/server/tests/socket.php6
-rw-r--r--plugins/server/tests/tcp.php8
2 files changed, 7 insertions, 7 deletions
diff --git a/plugins/server/tests/socket.php b/plugins/server/tests/socket.php
index 143c3ce4..1b76481a 100644
--- a/plugins/server/tests/socket.php
+++ b/plugins/server/tests/socket.php
@@ -6,7 +6,7 @@
use Spiral\Goridge;
use Spiral\RoadRunner;
-require dirname(__DIR__) . "/../../vendor_php/autoload.php";
+require dirname(__DIR__) . "/../../tests/vendor/autoload.php";
$relay = new Goridge\SocketRelay(
"unix.sock",
@@ -16,9 +16,9 @@ $relay = new Goridge\SocketRelay(
$rr = new RoadRunner\Worker($relay);
-while ($in = $rr->receive($ctx)) {
+while ($in = $rr->waitPayload()) {
try {
- $rr->send((string)$in);
+ $rr->send((string)$in->body);
} catch (\Throwable $e) {
$rr->error((string)$e);
}
diff --git a/plugins/server/tests/tcp.php b/plugins/server/tests/tcp.php
index 2d6fb00a..c567c982 100644
--- a/plugins/server/tests/tcp.php
+++ b/plugins/server/tests/tcp.php
@@ -6,15 +6,15 @@
use Spiral\Goridge;
use Spiral\RoadRunner;
-require dirname(__DIR__) . "/../../vendor_php/autoload.php";
+require dirname(__DIR__) . "/../../tests/vendor/autoload.php";
$relay = new Goridge\SocketRelay("localhost", 9999);
$rr = new RoadRunner\Worker($relay);
-while ($in = $rr->receive($ctx)) {
+while ($in = $rr->waitPayload()) {
try {
- $rr->send((string)$in);
+ $rr->send((string)$in->body);
} catch (\Throwable $e) {
$rr->error((string)$e);
}
-} \ No newline at end of file
+}