- 启动与管理
- 启动
- 使用
启动与管理
在项目目录下执行如下命令可以看到websocket server的管理命令. 跟http server的管理命令一致.
$ php bin/swoft wsDescription:There some commands for manage the webSocket serverUsage:ws:{command} [arguments] [options]Commands:start Start the webSocket serverstop Stop the running serverrestart Restart the running serverOptions:-h, --help Show help of the command group or specified command action
启动
- 前台运行
$ php bin/swoft ws:start
- 后台运行
$ php bin/swoft ws:start -d
使用
如果你注册了ws的路由处理模块,现在就可以通过浏览器等ws客户端连接上server了
