https://github.com/findsomething/syar
swoole + yar + tcp
https://github.com/findsomething/syar
rpc swoole tcp yar
Last synced: 2 months ago
JSON representation
swoole + yar + tcp
- Host: GitHub
- URL: https://github.com/findsomething/syar
- Owner: findsomething
- Created: 2017-01-12T15:04:58.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-12-04T15:12:07.000Z (over 8 years ago)
- Last Synced: 2024-05-06T17:15:33.218Z (almost 2 years ago)
- Topics: rpc, swoole, tcp, yar
- Language: PHP
- Homepage:
- Size: 51.8 KB
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## syar
### 说明
1. 用swoole+yar实现了一个简单的rpc调用 目前只实现了单次调用(数据解析部分借鉴了https://github.com/stcer/syar thx)
2. tcp 初步实现了一个类似的rpc调用
### 使用方法
* 启动服务端:
bin/server run|start|stop|restart config/server.php
* 启动带tcp与http的服务端 :
bin/server run|start|stop|restart config/multi-server.php
### 测试
http
```
$client = new \Yar_client("http://127.0.0.1:9503/?service=TestService");
$params = array('hello' => 'world');
$result = $client->giveBack($params);
```
tcp
```
$client = new \FSth\SYar\Client\Client('127.0.0.1', '9504', 'TestService');
$result = $client->giveBack(['hello' => 'world']);
```
### changelog
* 2017-03-17 v0.1.4
```
add rpc with tcp protocol
```
* 2017-05-15 v0.2.0
```
add cmd Ø
```
* 2017-07-06 v0.3.0
```
add zipKin support
```