示例#1
0
        private void SendRooms(bool broadcast = false)
        {
            List <Room> roomList = roomDao.All();

            if (broadcast)
            {
                Sessions.Broadcast(JsonConvert.SerializeObject(new { type = RoomActions.UPDATE_ROOMS, rooms = roomList }));
            }
            else
            {
                Send(JsonConvert.SerializeObject(new { type = RoomActions.UPDATE_ROOMS, rooms = roomList }));
            }
        }
示例#2
0
 public ActionResult Index()
 {
     return(Json(roomDAO.All(), JsonRequestBehavior.AllowGet));
 }