Esempio n. 1
0
 /**
  * Update the room information for all the client in the room
  *
  * @param      Room        $room   The room to update the clients from
  *
  * @return     \Generator
  */
 private function updateRoom(Room $room)
 {
     foreach ($room->getClients() as $client) {
         (yield $client->getConnection()->send(json_encode(['service' => $this->serviceName, 'action' => 'updateRoom', 'roomId' => $room->id, 'roomInformation' => $room->__toArray()])));
     }
 }