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