(要求Workerman版本>=3.3.0)
void ChannelServer::__construct([string $listen_ip = '0.0.0.0', int $listen_port = 2206])
实例化一个ChannelServer服务端
listen_ip
监听的本机ip地址,不传默认是0.0.0.0
listen_port
监听的端口,不传默认是2206
use WorkermanWorker;
require_once __DIR__ . '/Workerman/Autoloader.php';
require_once __DIR__ . '/Channel/src/Server.php';
// 不传参数默认是监听0.0.0.0:2206
$channel_server = new ChannelServer();
if(!defined('GLOBAL_START'))
{
Worker::runAll();
}