def newNode (self, data):
   MeshNode.newNode (self, data)
   print "node0 - Added " + data
   self.nodes += 1
   if self.nodes == NUMOBSERVERS + 1:
     print "Everybody who could joined"
     for x in xrange(0, NUMPACKETS):
       reactor.callLater(0.1 * x, (lambda y: self.push_packet(y)), x)
 def newNode(self, data):
     MeshNode.newNode(self, data)
     print "node0 - Added " + data
     self.nodes += 1
     if self.nodes == NUMOBSERVERS + 1:
         print "Everybody who could joined"
         for x in xrange(0, NUMPACKETS):
             reactor.callLater(0.1 * x, (lambda y: self.push_packet(y)), x)
 def newNode (self, data):
   MeshNode.newNode (self, data)
   print "node0 - Added " + data
   self.nodes += 1
   if self.nodes == NUMNODES:
     print "Everybody joined"
     for x in xrange(0, NUMPACKETS):
       reactor.callLater(0.1 * x, (lambda y: self.pushInput(str(y) + "\n")), x)
Пример #4
0
 def newNode (self, data):
   MeshNode.newNode (self, data)
   print "node0 - Added " + data
   self.nodes += 1
   if self.nodes == NUMNODES - 1:
     print "Everybody who could joined"
     for x in xrange(0, NUMPACKETS):
       reactor.callLater(0.1 * x, (lambda y: self.pushInput(str(y) + "\n")), x)
Пример #5
0
 def newNode(self, data):
     MeshNode.newNode(self, data)
     print data + " joined"
     if (data == failnode.name):
         m.removeMeshNode(failnode)
         n = MeshNode("joinnode", m)
         m.addMeshNode(n)
         m.connect_duplex(self, n, 1024, 50, 0.30)
     if (data == "joinnode"):
         global success
         success = True
         reactor.crash()
 def newNode (self, data):
   MeshNode.newNode (self, data)
   print data + " joined"