Example #1
0
 internal void RaiseDisconnect()
 {
     RemoteSharedObject.DispatchDisconnect(this);
     if (DisconnectHandler != null)
     {
         DisconnectHandler(this, new EventArgs());
     }
 }
Example #2
0
 private static RemoteSharedObject GetRemote(Type type, string name, string remotePath, object persistence, bool secure)
 {
     lock ((SharedObjects as ICollection).SyncRoot)
     {
         if (SharedObjects.ContainsKey(name))
         {
             return(SharedObjects[name] as RemoteSharedObject);
         }
         RemoteSharedObject rso = Activator.CreateInstance(type) as RemoteSharedObject;
         ValidationUtils.ArgumentConditionTrue(rso != null, "type", "Expecting a RemoteSharedObject type");
         rso._name                = name;
         rso._path                = remotePath;
         rso._persistentSO        = !false.Equals(persistence);
         rso._secure              = secure;
         rso._objectEncoding      = ObjectEncoding.AMF0;
         rso._initialSyncReceived = false;
         rso._ownerMessage        = new SharedObjectMessage(null, null, -1, false);
         SharedObjects[name]      = rso;
         return(rso);
     }
 }
Example #3
0
 private static RemoteSharedObject GetRemote(Type type, string name, string remotePath, object persistence, bool secure)
 {
     lock (((ICollection)SharedObjects).SyncRoot)
     {
         if (SharedObjects.ContainsKey(name))
         {
             return(SharedObjects[name]);
         }
         RemoteSharedObject obj2 = Activator.CreateInstance(type) as RemoteSharedObject;
         ValidationUtils.ArgumentConditionTrue(obj2 != null, "type", "Expecting a RemoteSharedObject type");
         obj2._name = name;
         obj2._path = remotePath;
         bool flag2 = false;
         obj2._persistentSO        = !flag2.Equals(persistence);
         obj2._secure              = secure;
         obj2._objectEncoding      = FluorineFx.ObjectEncoding.AMF0;
         obj2._initialSyncReceived = false;
         obj2._ownerMessage        = new SharedObjectMessage(null, null, -1, false);
         SharedObjects[name]       = obj2;
         return(obj2);
     }
 }
Example #4
0
        internal static void Dispatch(SharedObjectMessage message)
        {
            RemoteSharedObject rso = null;

            lock ((SharedObjects as ICollection).SyncRoot)
            {
                if (SharedObjects.ContainsKey(message.Name))
                {
                    rso = SharedObjects[message.Name] as RemoteSharedObject;
                }
            }
            if (rso != null)
            {
                try
                {
                    rso.DispatchSharedObjectMessage(message);
                }
                catch (Exception ex)
                {
                    rso.RaiseNetStatus(ex);
                }
            }
        }
Example #5
0
        internal static void Dispatch(SharedObjectMessage message)
        {
            RemoteSharedObject obj2 = null;

            lock (((ICollection)SharedObjects).SyncRoot)
            {
                if (SharedObjects.ContainsKey(message.Name))
                {
                    obj2 = SharedObjects[message.Name];
                }
            }
            if (obj2 != null)
            {
                try
                {
                    obj2.DispatchSharedObjectMessage(message);
                }
                catch (Exception exception)
                {
                    obj2.RaiseNetStatus(exception);
                }
            }
        }
Example #6
0
 internal void OnSharedObject(RtmpConnection connection, RtmpChannel channel, RtmpHeader header, SharedObjectMessage message)
 {
     RemoteSharedObject.Dispatch(message);
 }