diff options
-rw-r--r-- | README.md | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -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: -------- |