# 关于
服务端的实现基于 workman。
使用 `stream_socket_*` 实现了一个简单的同步 client ,目前只支持 workman 的 frame 协议。使用示例:[https://github.com/caylof/php-rpc](https://github.com/caylof/php-rpc)
# 服务定义说明
服务方法的定义需要遵循如下方式函数签名process\RpcServer::class,
'listen' => 'frame://0.0.0.0:2345',
'count' => 1,
],
```
- 定义一个服务'name' => 'asdf']);
return json($result);
}
```
然后访问 `http://127.0.0.1:8787/index/rpc`,不出意外应该会调用成功$arguments);
}
}
```
新建文件 `app/rpc/client/TestSrv.php`,作为 client 端服务类,只需继续基类:
```php
<?