'Called when a hostname has been resolved to an ip address.
Constructs a scraper and opens a UDP port to listen on.
Removes an old scraper if present.
:param ip_address: The ip address that matches the hostname of the tracker_url.
:param start_scraper: Whether we should start the scraper immediately.'

def on_ip_address_resolved(self, ip_address, start_scraper=True):

    self.ip_address = ip_address
    self.scraper = UDPScraper(self, self.ip_address, self.port, self.timeout)
    if start_scraper:
        reactor.listenUDP(0, self.scraper)
