
swoole
dabao87
php
展开
-
安装swoole
服务器:centos7/nbuntu16,只能在Linux上安装Php版本:5.4以上 步骤:我的Linux是centos7的1.下载地址: http://pecl.php.net/package/swoole(不一定能上去)或者 源码下载地址 : https://github.com/swoole/swoole-src/releases或者使用 wget http:/...原创 2018-09-06 21:12:24 · 419 阅读 · 0 评论 -
swoole简单demo
<?php//创建Server对象,监听 127.0.0.1:9501端口$serv = new swoole_server("0.0.0.0", 9501); //监听连接进入事件$serv->on('connect', function ($serv, $fd) { echo "Client: Connect.\n";});//监听数据接收事件$se...原创 2018-10-11 20:33:04 · 1687 阅读 · 0 评论 -
thinkphp5 swoole 执行异步任务
<?php/**author:hdj*/namespace app\Console;use think\console\Command;use think\console\Input;use think\console\Output;class Websocket extends Command{ protected $server; protecte...转载 2018-11-16 17:17:04 · 3984 阅读 · 4 评论