示例#1
0
 //write meeting
 public void writeMeeting(MeetingProposal meeting, List <ServerInfo> servers)
 {
     if (server.freeze)
     {
         Action action = new Action(() => writeMeeting(meeting, servers));
         server.actionList.Add(action);
         return;
     }
     Log.Debug("write meeting {topic} version {v}", meeting.topic, meeting.version);
     server.randomSleep();
     if (server.meetingList.ContainsKey(meeting.topic) &&
         meeting.version > server.meetingList[meeting.topic].version)
     {
         server.meetingList.Remove(meeting.topic);
         server.meetingList.Add(meeting.topic, meeting);
         server.blockedMeetings.Remove(meeting.topic);
         //update location's room
         if (meeting.room != null)
         {
             Location location = meeting.room.location;
             location.roomList.Remove(meeting.room.room_name);
             location.roomList.Add(meeting.room.room_name, meeting.room);
         }
         //Async send meeting info to clients
         server.updateClients(meeting);
     }
     //send broadcast to servers
     server.writeBroadcast(meeting, servers);
 }