//Destruit Sesion
        public int DestroySession(UserModel user, string pIp)
        {
            Random randNum = new Random();
            EnvironmentFactory environmentFactory = new EnvironmentFactory();
            Domain domain = environmentFactory.GetDomain(user.domain);
            int pSesionCaida = Engine.SesionCaida;

            return Engine.p4bEstablecerSesion
                (
                user.username,
                user.password,
                user.domain.name,
                randNum.Next(999999999),
                pIp,
                domain.connectionType,
                pSesionCaida
                );
        }
        //Manejo de sesion.

        //Establecer sesion.
        public int EstablishSession(UserModel user, string pIp)
        {
            Random randNum = new Random();
            int sessionID = 111111111;
            int pSesionCaida = 0;

            EnvironmentFactory environmentFactory = new EnvironmentFactory();
            Domain domain = environmentFactory.GetDomain(user.domain);
            environmentFactory.Release();


            return Engine.p4bEstablecerSesion
                (
                user.username,
                user.password,
                user.domain.name,
                sessionID,
                pIp,
                domain.connectionType,
                pSesionCaida
                );
        }