summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-01-28 01:24:06 +0300
committerGitHub <[email protected]>2018-01-28 01:24:06 +0300
commit8106d36a7685eeab1ab89a4aec83db83dd59b8be (patch)
tree9498c2e37e63323f4b3ea32f602aad23cf74363c /README.md
parentbfc9367b57191b2cfd4508102ae9c039c692964d (diff)
Update README.md
Diffstat (limited to 'README.md')
-rw-r--r--README.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/README.md b/README.md
index e49da425..e70a6be1 100644
--- a/README.md
+++ b/README.md
@@ -36,6 +36,25 @@ defer p.Destroy()
rsp, err := p.Exec(&Payload{Body: []byte("hello")})
```
+```
+<?php
+/**
+ * @var Goridge\RelayInterface $relay
+ */
+
+use Spiral\Goridge;
+use Spiral\RoadRunner;
+
+$rr = new RoadRunner\Worker($relay);
+
+while ($in = $rr->receive($ctx)) {
+ try {
+ $rr->send((string)$in);
+ } catch (\Throwable $e) {
+ $rr->error((string)$e);
+ }
+}
+```
License:
--------