<?php use Workerman\Worker; require_once VENDOR_PATH.'workerman/workerman/Autoloader.php'; // 初始化一个worker容器,监听1234端口 $worker = new Worker('websocket://0.0.0.0:1234'); // 这里进程数必须设置为1 $worker->count = 1; //...