zoukankan      html  css  js  c++  java
  • getwework 使用笔记

    ## 下载 https://www.workerman.net/download ![](https://img2018.cnblogs.com/blog/1648143/201911/1648143-20191115211643965-1334042730.jpg) 或者使用composer `composer require workerman/gateway-worker` ![](https://img2018.cnblogs.com/blog/1648143/201911/1648143-20191115211646126-143846917.jpg) 手册: http://doc2.workerman.net/ ## 使用 将下载的demo移入项目 https://www.workerman.net/download/GatewayWorker.zip ![](https://img2018.cnblogs.com/blog/1648143/201911/1648143-20191115211648140-1921308858.jpg) 修改配置 tcp改为websocket ![](https://img2018.cnblogs.com/blog/1648143/201911/1648143-20191115211650341-1321939578.jpg) 启动服务 cd vendor/GatewayWorker/ php start.php start -d 开启的扩展 pcntl_fork posix pcntl ## 简单应用 ![](https://img2018.cnblogs.com/blog/1648143/201911/1648143-20191115211650943-1461023365.jpg) ![](https://img2018.cnblogs.com/blog/1648143/201911/1648143-20191115211652349-1393383223.jpg) ## 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)
  • 相关阅读:
    angular 中如何使用自定义组件
    angular组件数据和事件
    angular组件数据
    angular绑定数据
    angular自定义组件
    angular项目目录结构分析
    Angular 开发工具介绍
    从Microsoft.AspNet.Identity看微软推荐的一种MVC的分层架构
    EF How to use context.Set and context.Entry, which ships with EF4.1 ?
    C# 向IQueryable添加一个Include扩展方法
  • 原文地址:https://www.cnblogs.com/wmc1125/p/11869611.html
Copyright © 2011-2022 走看看