Exemple #1
0
	def node_setup(self, url, dirname, urlfile):
		self.secret = random_string(SECRET_LENGTH)
		n = ListableNode(url, dirname, self.secret)
		t = Thread(target=n._start)
		t.setDaemon(1)
		t.start()
		sleep(HEAD_START)
		self.server = ServerProxy(url)
		for line in open(urlfile):
			line = line.strip()
			self.server.hello(line)
 def node_setup(self, url, dirname, urlfile):
     self.secret = random_string(SECRET_LENGTH)
     n = Node(url, dirname, self.secret)
     t = Thread(target=n._start)
     t.setDaemon(1)
     t.start()
     # Give the server a head start:
     sleep(HEAD_START)
     self.server = ServerProxy(url)
     for line in open(urlfile):
         line = line.strip()
         self.server.hello(line)