Esempio n. 1
0
 public function actionWsserver()
 {
     $config = array('host' => '0.0.0.0', 'port' => '8000', 'workers' => 1);
     //            $WebsocketServer = new WebsocketServer($config);
     $WebsocketServer = new WebsocketServer($config);
     $WebsocketServer->start();
     $this->renderText("server closed");
 }
Esempio n. 2
0
 public function actionRestart()
 {
     $WebsocketServer = new WebsocketServer(Yii::app()->websocket);
     $WebsocketServer->start();
     $WebsocketServer->stop();
 }
Esempio n. 3
0
 public function actionRestart()
 {
     $WebsocketServer = new WebsocketServer((array) Yii::app()->websocket);
     $WebsocketServer->restart();
 }