def main(): "Main thread executes this function" LOGFILE = "log.txt" server = listener(1, 'Server', SERVER_PORT, LOGFILE) checkConnect = checkConnectivity(2, 'Check Connection', True) server.start() checkConnect.start() print "Main thread will remain alive...As good as dead though"
def bootstrap(): "Members bootstrapping looking for an overlay and coordinator" # Start a thread listening for Coordinator Lookup messages messageHandler = listener(1, "Listener for JOIN, LEAV, LKUP", 9798, LOGFILE) if STARTASCOORDINATOR == False: coordinatorLookup() else: COORDINATOR = socket.gethostname() print "Coordinator lookup returned " + COORDINATOR
def bootstrap(): "Members bootstrapping looking for an overlay and coordinator" # Start a thread listening for Coordinator Lookup messages messageHandler = listener(1, "Listener for JOIN, LEAV, LKUP", LISTEN_PORT, LOGFILE) messageHandler.start() if STARTASCOORDINATOR == False: coordinatorLookup() else: #COORDINATOR = socket.gethostname() COORDINATOR = "planetlab1.node" print "Coordinator lookup returned " + COORDINATOR