public void run() {
        Console.log("[UDP] receiver started.");
        timer = System.currentTimeMillis();
        while (!done) {
            recieve();
            if (stopConditionsProcessor(settings.getStopConditions())) {
                Console.log("[UDP] " + receivedPackageCount + " packets received");
                shutDown();
            }
        }
        if (channel != null) {
            try {
                channel.close();
                Console.log("[UDP] receiver stopped.");
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }