Disconnect() public method

public Disconnect ( VMEODClient client ) : void
client VMEODClient
return void
        public void ForceDisconnectObj(VMEntity invoker)
        {
            VMEODServer server = null;

            if (InvokerToEOD.TryGetValue(invoker.ObjectID, out server))
            {
                var invokerClient = server.Clients.FirstOrDefault(x => x.Invoker == invoker);
                if (invokerClient != null)
                {
                    server.Disconnect(invokerClient);
                }
            }
        }
        public void ForceDisconnect(VMAvatar avatar)
        {
            VMEODServer server = null;

            if (AvatarToEOD.TryGetValue(avatar.PersistID, out server))
            {
                var avatarClient = server.Clients.FirstOrDefault(x => x.Avatar == avatar);
                if (avatarClient != null)
                {
                    server.Disconnect(avatarClient);
                }
            }
        }
Example #3
0
        public void ActionCancelDisconnect(VMAvatar avatar)
        {
            VMEODServer server = null;

            if (AvatarToEOD.TryGetValue(avatar.ObjectID, out server))
            {
                if (!server.CanBeActionCancelled)
                {
                    return;
                }
                var avatarClient = server.Clients.FirstOrDefault(x => x.Avatar == avatar);
                if (avatarClient != null)
                {
                    server.Disconnect(avatarClient);
                }
            }
        }