/// <summary>
        /// Recibir informaciĆ³n inicial del cliente
        /// </summary>
        /// <returns>True si todo salio bien</returns>
        private bool getClientInitialInfo(TgcSocketClientInfo clientInfo, Socket socket)
        {
            try
            {
                //Recibir info inicial del cliente
                TgcSocketRecvMsg msg = TgcSocketMessages.receiveMessage(socket, TgcSocketMessageHeader.MsgType.InitialMessage);
                if (msg == null)
                {
                    return(false);
                }

                //Guardar sus datos y cambiar su estado
                TgcSocketInitialInfoClient clientInitInfo = (TgcSocketInitialInfoClient)msg.readNext();
                clientInfo.Name   = clientInitInfo.clientName;
                clientInfo.Status = TgcSocketClientInfo.ClientStatus.WaitingClientOk;

                //Asignar Player ID a cliente
                TgcSocketInitialInfoServer serverInitInfo = new TgcSocketInitialInfoServer();
                serverInitInfo.serverName = serverName;
                serverInitInfo.playerId   = playerIdCounter;
                clientInfo.PlayerId       = serverInitInfo.playerId;
                playerIdCounter++;

                //Enviar info inicial del server
                TgcSocketSendMsg sendMsg = new TgcSocketSendMsg();
                sendMsg.write(serverInitInfo);
                TgcSocketMessages.sendMessage(socket, sendMsg, TgcSocketMessageHeader.MsgType.InitialMessage);

                return(true);
            }
            catch (SocketException)
            {
                return(false);
            }
        }
        /// <summary>
        /// Recibir informacion inicial del server
        /// </summary>
        /// <returns>True si todo salio bien</returns>
        private bool getServerInitialInfo()
        {
            try
            {
                //Recibir info inicial del server
                TgcSocketRecvMsg msg = TgcSocketMessages.receiveMessage(clientSocket, TgcSocketMessageHeader.MsgType.InitialMessage);
                if (msg == null)
                {
                    return(false);
                }

                //Guardar sus datos y cambiar su estado
                TgcSocketInitialInfoServer serverInitInfo = (TgcSocketInitialInfoServer)msg.readNext();
                serverInfo.Name = serverInitInfo.serverName;
                playerId        = serverInitInfo.playerId;

                //Enviar OK final
                this.status = TgcSocketClientInfo.ClientStatus.Connected;
                TgcSocketSendMsg sendMsg = new TgcSocketSendMsg();
                sendMsg.write(true);
                return(TgcSocketMessages.sendMessage(clientSocket, sendMsg, TgcSocketMessageHeader.MsgType.InitialMessage));
            }
            catch (SocketException)
            {
                return(false);
            }
        }
        /// <summary>
        /// Recibir informaciĆ³n inicial del cliente
        /// </summary>
        /// <returns>True si todo salio bien</returns>
        private bool getClientInitialInfo(TgcSocketClientInfo clientInfo, Socket socket)
        {
            try
            {
                //Recibir info inicial del cliente
                TgcSocketRecvMsg msg = TgcSocketMessages.receiveMessage(socket, TgcSocketMessageHeader.MsgType.InitialMessage);
                if (msg == null)
                {
                    return false;
                }

                //Guardar sus datos y cambiar su estado
                TgcSocketInitialInfoClient clientInitInfo = (TgcSocketInitialInfoClient)msg.readNext();
                clientInfo.Name = clientInitInfo.clientName;
                clientInfo.Status = TgcSocketClientInfo.ClientStatus.WaitingClientOk;

                //Asignar Player ID a cliente
                TgcSocketInitialInfoServer serverInitInfo = new TgcSocketInitialInfoServer();
                serverInitInfo.serverName = serverName;
                serverInitInfo.playerId = playerIdCounter;
                clientInfo.PlayerId = serverInitInfo.playerId;
                playerIdCounter++;

                //Enviar info inicial del server
                TgcSocketSendMsg sendMsg = new TgcSocketSendMsg();
                sendMsg.write(serverInitInfo);
                TgcSocketMessages.sendMessage(socket, sendMsg, TgcSocketMessageHeader.MsgType.InitialMessage);

                return true;
            }
            catch (SocketException)
            {
                return false;
            }
        }