'Create an instance of the Zeroconf class.
establishing multicast communications, listening and reaping threads.'

def __init__(self, bindaddress=None):

    global _GLOBAL_DONE
    _GLOBAL_DONE = False
    if (bindaddress is None):
        try:
            s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
            s.connect(('4.2.2.1', 123))
            self.intf = s.getsockname()[0]
        except:
            self.intf = socket.gethostbyname(socket.gethostname())
    else:
        self.intf = bindaddress
    self.group = ('', _MDNS_PORT)
    self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    try:
        self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
        self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
    except:
        pass
    self.socket.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 255)
    self.socket.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_LOOP, 1)
    try:
        self.socket.bind(self.group)
    except:
        pass
    self.socket.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, (socket.inet_aton(_MDNS_ADDR) + socket.inet_aton('0.0.0.0')))
    self.listeners = []
    self.browsers = []
    self.services = {}
    self.servicetypes = {}
    self.cache = DNSCache()
    self.condition = threading.Condition()
    self.engine = Engine(self)
    self.listener = Listener(self)
    self.reaper = Reaper(self)
