Exemplo n.º 1
0
 def send(self, data):
     try:
         packed = pp.pack(data)
         self.outbufferqueue.put((packed, time.time()))
         self.set_writeable(True)
         return True
     except Queue.Full:
         logger.error("add data to qeueu FAILED!")
         return False
Exemplo n.º 2
0
 def send(self, data):
     assert(self.started)
     try:
         #print "-"*200
         #traceback.print_stack()
         packed = pp.pack(data)
         self.outbufferqueue.put((packed, time.time()))
         self.set_writeable(True)
         return True
     except Queue.Full:
         logger.error("add data to qeueu FAILED!")
         return False