swoole
攸乐
这个作者很懒,什么都没留下…
展开
-
swoole定时器
$serv = new Swoole\Websocket\Server("127.0.0.1", 9502); $serv->on('Open', function($server, $req) { echo "connection open: ".$req->fd . "\n"; }); $serv->...转载 2018-05-17 09:24:43 · 342 阅读 · 0 评论 -
swoole服务平滑重启
1. load.sh脚本echo "loading..." pid="pidof live_name" echo $pid kill -USR1 $pid echo "loading success"2. linux中执行sh load.sh原创 2018-05-17 15:28:59 · 4155 阅读 · 0 评论 -
swoole安装
clone 源码安装 git clone https://gitee.com/swoole/swoole.git phpize 外挂模块(运行phpize文件) /usr/bin/phpize yum install m4 & yum install autoconf//如果报错请安装 3. php 编译 ./configure –with-...原创 2018-05-17 19:39:16 · 232 阅读 · 0 评论 -
swoole_websocket_server
<?php /** * ws 优化 基础类库 * User: 攸乐 * Date: 18/5/15 * Time: 上午12:34 */ class Ws { CONST HOST = "0.0.0.0"; CONST PORT = 8812; CONST CHAR_PORT=8811;//多端口 public $ws = null; pu...原创 2018-05-17 19:46:41 · 1691 阅读 · 0 评论 -
easyswoole使用记录
报错1 error response has end at status 1 解决:屏蔽options请求的时候需要return false;(easyswoole文档中只有”解决跨域”代码,并没有return false) ...原创 2018-08-29 17:08:13 · 4986 阅读 · 0 评论