示例#1
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $address = $this->option('address');
     $port = intval($this->option('port'));
     $this->info('Starting web socket server on port ' . $port);
     $server = IoServer::factory(new HttpServer(new WsServer($this->connection)), $port, $address);
     $this->connection->setServer($server);
     $server->run();
 }