![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
swoole
change哥
菜鸟PHPer一个
展开
-
swoole websocket server记录
swoole websocket对象创建 //基类 abstract class Server { //把实例存到属性中 public $serv = null; public function __construct() { $this->serv = new \swoole_websocket_server('0.0.0.0',9501); //设置基本配置 $t原创 2018-12-25 14:13:01 · 380 阅读 · 0 评论 -
swoole的task使用
task模块用来做一些异步的慢速任务,比如webim中发广播,发送邮件等 task进程必须是同步阻塞的 task进程支持定时器 public function __construct() { $this->serv = new \swoole_websocket_server('0.0.0.0',9501); } $this->serv->set(array( // 配置Ta...原创 2018-12-25 14:35:41 · 549 阅读 · 0 评论