Skip to content

Commit

Permalink
网络通信协议
Browse files Browse the repository at this point in the history
  • Loading branch information
fucongcong committed Jul 25, 2017
1 parent 41a1cad commit bde6911
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
- 可以用作api也可以用作http server。

#### * 异步协程调度,应对高并发
#### * SOA服务化调用,支持并行、串行调用、请求合并调用。服务端采用AsyncTask进行异步处理后合并数据并返回。
#### * SOA服务化调用,支持并行、串行调用、请求合并调用
#### * 支持EOF结束符协议、自定义网络通信协议,支持json化、php序列化包体,支持gzip。
#### * 服务端采用异步Task处理后合并数据并返回。
#### * 支持异步日志,异步文件读写,异步Mysql,异步Redis
#### * 支持Mysql连接池,Redis连接池
#### * Mysql事务处理
Expand All @@ -18,7 +20,6 @@

##### TODO
- http异步客户端
- 包头+包体协议支持,目前只支持EOF结束符协议
- 异步大文件读取,目前只能读取<4M的文件

##### 环境依赖
Expand Down Expand Up @@ -74,6 +75,7 @@
- AsyncFile
- Container
- Controller
- Protocol
- [Config](https://fucongcong.gitbooks.io/group-doc/content/configpei-zhi.html)
- [Event](https://fucongcong.gitbooks.io/group-doc/content/eventshi-jian.html)
- [Route](https://fucongcong.gitbooks.io/group-doc/content/lu-you.html)
Expand Down
15 changes: 11 additions & 4 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
],
],

'swoole_host' => '127.0.0.1',
'host' => '127.0.0.1',

'swoole_port' => 9777,
'port' => 9777,

'swoole_setting' => [
'setting' => [
//日志
//'daemonize' => true,
'log_file' => 'runtime/error.log',
Expand All @@ -55,8 +55,15 @@
'dispatch_mode' => 3,
],

//通信协议 eof:结束符, buf:自定义包头+包体
'protocol' => 'buf',
//包体的打包方式json,serialize
'pack' => 'json',
//是否启用gzip压缩true,false
'gzip' => true,

//在启动时可以添加用户自定义的工作进程,必须是swoole_process
'swoole_process' => [
'process' => [
//'src\Admin\Process\HeartbeatProcess',
],
];

0 comments on commit bde6911

Please sign in to comment.