Startup and management

Execute the following command in the project directory to see the websocket server management command. It is consistent with the http server management command.

$ php bin/swoft ws
Description:
  There some commands for manage the webSocket server

Usage:
  ws:{command} [arguments] [options]

Commands:
  start    Start the webSocket server
  stop     Stop the running server
  restart  Restart the running server

Options:
  -h, --help  Show help of the command group or specified command action

启动

  • 前台运行
$ php bin/swoft ws:start
  • 后台运行
$ php bin/swoft ws:start -d

use

If you registered the ws routing processing module, you can now connect to the server via a ws client such as a browser.

/docs/2.x/en/websocket-server/manage.html
progress-bar