Esempio n. 1
0
        /// <summary>创建在线</summary>
        /// <param name="sessionid"></param>
        /// <returns></returns>
        protected virtual IOnline CreateOnline(String sessionid)
        {
            var ns  = Session as NetSession;
            var sid = ns.Remote.EndPoint + "";

            var olt = UserOnline.GetOrAdd(sid);

            olt.ExternalUri = ns.Remote + "";

            if (Current is User user)
            {
                //olt.DeviceId = user.ID;
                //olt.ProductId = user.ProductId;
                olt.Name = user.Name;

                olt.Version = user.Version;
                //olt.CompileTime = user.CompileTime;
                //olt.Memory = user.Memory;
                //olt.MACs = user.MACs;
                //olt.COMs = user.COMs;

                olt.CreateIP = ns.Remote.Address + "";
            }

            olt.SaveAsync();

            return(olt);
        }