示例#1
0
        /// <summary>
        /// exit Player Remove
        /// </summary>
        /// <param name="c"></param>
        private void ClientRemove(ClientTCP c)
        {
            var cNumber = PlayerDic.FirstOrDefault(x => x.Value.Client == c).Key;

            PlayerDic.Remove(cNumber);
            //Test Room
            peopleCount--;
            c.CloseClient();
        }
示例#2
0
    public void CloseAllConnections()
    {
        if (isHost)
        {
            Server.CloseSockets();
        }

        if (isClient)
        {
            Client.CloseClient();
        }
    }