
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 · 446 阅读 · 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 · 1703 阅读 · 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 · 4019 阅读 · 4 评论