Exemplo n.º 1
0
 public override void RegisterProtocol(BaseProtocol protocol)
 {
     OutboundCluster = protocol as OutboundClusterProtocol;
     foreach (var room in ClientApplicationManager.ApplicationByName.Values)
     {
         room.SOManager.RegisterProtocol(OutboundCluster);
     }
     while (_offlineTasks != null)
     {
         _offlineTasks(OutboundCluster);
         _offlineTasks = null;
     }
 }
 public override void RegisterProtocol(BaseProtocol protocol)
 {
     OutboundCluster = protocol as OutboundClusterProtocol;
     foreach (var room in ClientApplicationManager.ApplicationByName.Values)
     {
         room.SOManager.RegisterProtocol(OutboundCluster);
     }
     while (_offlineTasks!=null)
     {
         _offlineTasks(OutboundCluster);
         _offlineTasks = null;
     }
 }
Exemplo n.º 3
0
 public uint GetAppId(string appName)
 {
     if (Application.SOManager["appList"][appName] == null)
     {
         if (OutboundCluster != null)
         {
             Logger.INFO("GetAppId:" + appName);
             OutboundCluster.Send(ClusterMessageType.GetAppId, o => o.Write(appName));
         }
         else
         {
             if (_offlineTasks == null)
             {
                 _offlineTasks = x => x.Send(ClusterMessageType.GetAppId, o => o.Write(appName));
             }
             else
             {
                 _offlineTasks += x => x.Send(ClusterMessageType.GetAppId, o => o.Write(appName));
             }
         }
         return(0);
     }
     return(Application.SOManager["appList"][appName]);
 }
 public uint GetAppId(string appName)
 {
     if (Application.SOManager["appList"][appName] == null)
     {
         if (OutboundCluster != null)
         {
             Logger.INFO("GetAppId:" + appName);
             OutboundCluster.Send(ClusterMessageType.GetAppId, o => o.Write(appName));
         }
         else
         {
             if (_offlineTasks == null)
                 _offlineTasks = x => x.Send(ClusterMessageType.GetAppId, o => o.Write(appName));
             else
                 _offlineTasks += x => x.Send(ClusterMessageType.GetAppId, o => o.Write(appName));
         }
         return 0;
     }
     return Application.SOManager["appList"][appName];
 }