Ejemplo n.º 1
0
def send_text_msg(text):
  msg = "node:textmsg:" + text
  instance.gmutex.acquire()
  log_text_msg(instance.name, text)
  gui.append_chat_msg(time.strftime("%H-%M-%S"), instance.name, text)
  for peer in network.get_connection_list():
    if peer == instance.name:
      continue;
    network.send(peer, msg)
  instance.gmutex.release()
Ejemplo n.º 2
0
def received_text_msg(sender, text):
  log_text_msg(sender, text)
  gui.append_chat_msg(time.strftime("%H-%M-%S"), sender, text)
  pass