Exemple #1
0
        /// <summary>
        /// 刷新所有设备的位置
        /// </summary>
        /// <returns>本次更新在线设备数量</returns>
        public static int FlushAllDeviceLocation()
        {
            var allconIds = _hubInfo.Select(s => s.connectionId).ToList();

            if (allconIds.Count > 0)
            {
                var client = AllClients.Clients(allconIds);
                client.uploadLocation();//向客户端发送上传位置信息事件
            }
            return(allconIds.Count);
        }
Exemple #2
0
 public static void SendNoti(object Data, params int[] MemberIds)
 {
     if (Data.IsNotNull())
     {
         var list = GetCurAdminDeviceIds(MemberIds);
         if (list.Count > 0)
         {
             var _members = list.Select(s => s.connectionId).ToList();
             var client   = AllClients.Clients(_members);
             client.GetNoti(Data);
         }
     }
 }