Example #1
0
class discover_services(object):
    def __init__(self, discover_timeout=5):
        self.discoverer = SynchronousServiceDiscoverer(discover_timeout)

    def __enter__(self):
        return self.discoverer.discover()

    def __exit__(self, exc_type, exc_val, exc_tb):
        self.discoverer.close()
Example #2
0
 def __init__(self, discover_timeout=5):
     self.discoverer = SynchronousServiceDiscoverer(discover_timeout)