## 下载 https://www.workerman.net/download  或者使用composer `composer require workerman/gateway-worker`  手册: https://doc2.workerman.net/ ## 使用 将下载的demo移入项目 https://www.workerman.net/download/GatewayWorker.zip  修改配置 tcp改为websocket  启动服务 cd vendor/GatewayWorker/ php start.php start -d 开启的扩展 pcntl_fork posix pcntl ## 简单应用   ## GatewayWorker 启动与停止linux命令 启动与停止 注意Workerman启动停止等命令都是在命令行中完成的。 要启动Workerman,首先需要有一个启动入口文件,里面定义了服务监听的端口及协议。 这里以workerman-chat为例,它的启动入口为start.php。 启动 以debug(调试)方式启动 php start.php start 以daemon(守护进程)方式启动 php start.php start -d 停止 php start.php stop 重启 php start.php restart 平滑重启 php start.php reload 查看状态 php start.php status ## 绑定 client_id 与当前用户ID的绑定 可一个用户ID对应多个client_id > 更多精彩文章请关注 [王明昌博客](https://www.wangmingchang.com)
## 下载 https://www.workerman.net/download ![](htt