/// <summary>
 /// A la réception d'un message de type "StateUpdate".
 /// Pour chaque IStateUpdateReceiver dans StateUpdateReceivers,
 /// on lance la méthode "OnStateUpdate" qui permet de mettre à jour le WorldState avec les informations reçues.
 /// </summary>
 /// <param name="info"></param>
 /// <param name="message"></param>
 void OnStateUpdate(BloodAndBileEngine.Networking.NetworkMessageInfo info, StateUpdateMessage message)
 {
     foreach (IStateUpdateReceiver receiver in StateUpdateReceivers)
     {
         receiver.OnStateUpdate(message);
     }
 }
 public void Prepare(int senderID, object hash, bool isDesktopSharing, int nSID)
 {
     bTaken         = true;
     msg            = new StateUpdateMessage();
     msg.updateType = UpdateTypeCode.UpdateApplicationSharingCompund;
     msg.SenderID   = senderID;
     msg.dataArray.Add(hash);
     nSessionID = nSID;
 }
Exemple #3
0
 public void Prepare(int senderID, object hash, bool isDesktopSharing, int nSID)
 {
     bTaken = true;
     msg = new StateUpdateMessage();
     msg.updateType = UpdateTypeCode.UpdateApplicationSharingCompund;
     msg.SenderID = senderID;
     msg.dataArray.Add(hash);
     nSessionID = nSID;
 }
 public void OnStateUpdate(StateUpdateMessage stateUpdate)
 {
 }
Exemple #5
0
        /// <summary>
        /// This method is used long before for sending logging messages
        /// of Document Sharing,Web Sharing etc.
        /// It should be removed from the code as per discussion. 
        /// </summary>
        /// <param name="receiver"></param>
        private void SendConferenceParameters(IMessageReceiver receiver)
        {
            StateUpdateMessage stateMessage2=new StateUpdateMessage();
            stateMessage2.updateType=UpdateTypeCode.UpdateMixedMessages;
            stateMessage2.SenderID=-1;
            Console.WriteLine("Logged Messages Count = " + LoggedMessages.Count);
            stateMessage2.dataArray=(ArrayList)this.LoggedMessages.Clone();
            receiver.ReceiveMessage(stateMessage2);

            stateMessage2 = null; //GC
            GC.Collect(); //GC

            if(this.DocumentSharingList.Count > 0) //Send the document sharing messages
            {// Todo::Ahmed u can look at it. I've stored documentsharing messages in a hashtable
                // so that there is only one message of a particular prestation session. this reduces
                // the the flickering at the client side.
                StateUpdateMessage stateMessage3=new StateUpdateMessage();
                stateMessage3.updateType=UpdateTypeCode.UpdateMixedMessages;
                stateMessage3.SenderID=-1;
                System.Collections.ICollection collection =  this.DocumentSharingList.Values;
                stateMessage3.dataArray = new ArrayList(collection);
                receiver.ReceiveMessage(stateMessage3);

                stateMessage3 = null; //GC
            }
            else if(this.WebBrowserList.Count > 0)
            {
                StateUpdateMessage stateMessage3=new StateUpdateMessage();
                stateMessage3.updateType=UpdateTypeCode.UpdateMixedMessages;
                stateMessage3.SenderID=-1;
                System.Collections.ICollection collection =  this.WebBrowserList.Values;
                stateMessage3.dataArray = new ArrayList(collection);
                receiver.ReceiveMessage(stateMessage3);

                stateMessage3 = null; //GC
            }
            GC.Collect(); //GC
            if(msgSynchronization != null)
                receiver.ReceiveMessage(msgSynchronization);
        }