想请教 在TP5.1 下如何启动channel 组件

yszy

使用TP5.0 启动workerman 的方法不好用  求教该如果启动  如果使用TP 的php think worker:server  可以启动workerman  但是识别不了channel组件 

2399 1 0
1个回答

latin

新建一个start_channel.php
<?php
use Workerman\Worker;
require_once 'path/of/vendor/autoload.php';
$channel_server = new Channel\Server('0.0.0.0', 2206);
if(!defined('GLOBAL_START'))
{
    Worker::runAll();
}
 
运行 php start_channel.php start -d

年代过于久远,无法发表回答
🔝