Esempio n. 1
0
        protected virtual void OnProviderUserDisconnected(object sender, ProviderUserEventArgs args)
        {
            var user = userMap[args.UserKey];

            NetUserDisconnected?.Invoke(this, new NetEventArgs()
            {
                User = user,
            });

            userMap.Remove(user.UserKey);
            userList.Remove(user);
        }
Esempio n. 2
0
        protected virtual void OnProviderUserConnected(object sender, ProviderUserEventArgs args)
        {
            var user = new NetUser(args.UserKey, nextUserId++);

            userMap[user.UserKey] = user;
            userList.Add(user);

            NetUserConnected?.Invoke(this, new NetEventArgs()
            {
                User = user,
            });
        }