diff options
author | Wolfy-J <[email protected]> | 2018-01-28 01:24:06 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2018-01-28 01:24:06 +0300 |
commit | 8106d36a7685eeab1ab89a4aec83db83dd59b8be (patch) | |
tree | 9498c2e37e63323f4b3ea32f602aad23cf74363c /README.md | |
parent | bfc9367b57191b2cfd4508102ae9c039c692964d (diff) |
Update README.md
Diffstat (limited to 'README.md')
-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: -------- |