Ejemplo n.º 1
0
 internal void RaiseDisconnect()
 {
     RemoteSharedObject.DispatchDisconnect(this);
     if (DisconnectHandler != null)
     {
         DisconnectHandler(this, new EventArgs());
     }
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 3
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);
                }
            }
        }
Ejemplo n.º 4
0
 internal void OnSharedObject(RtmpConnection connection, RtmpChannel channel, RtmpHeader header, SharedObjectMessage message)
 {
     RemoteSharedObject.Dispatch(message);
 }