public void listen(){
        ServerSocket socolServidor = null;
        try {
            socolServidor = new ServerSocket(PORT);
            System.out.println("AlkiriaLoginServer Inicialized...");
            //Mentre no parem anem escoltant
            while(!end){
                //Establim la conexió i la guardem al pool de conexions
                Socket clientSocket = socolServidor.accept();
                generateClientConnection(clientSocket);
            }
        } catch (IOException ex) {
            Logger.getLogger(AlkiriaLoginServer.class.getName()).log(Level.SEVERE, null, ex);
        }finally{
            //Tanquem totes les conexions obertes
            for (ConnectionService servei: getConnections()){
                if(!servei.isClosed()){
                    System.out.println("Client Closed...");
                    servei.close();
                }
            }
        }
        try {
            //Tanquem el servidor
            socolServidor.close();
            System.out.println("AlkiriaLoginServer Shutdown...");
        } catch (IOException ex) {
            Logger.getLogger(AlkiriaLoginServer.class.getName()).log(Level.SEVERE, null, ex);
        }
    }