def recive(data):
    msg = message.Message.deserialize(data)
    inst.addBytes("IN",len(data))
    t = threading.Thread(target=lambda:node.handle_message(msg))
    t.daemon = True
    t.start()    
    return "ACK"
 def send_message(self,msg,dest):
     time.sleep(0.01)
     data = msg.serialize()
     inst.addBytes("OUT",len(data))
     try:
         server = ServerProxy("http://"+str(dest.IPAddr)+":"+str(dest.ctrlPort))
         server.recive(data)
     except Exception:
         node.message_failed(msg,dest)