python的ip信使库

ipymessenger的Python项目详细描述


用于IP messenger的库。

如何使用

# username, group name, port(default 2524)
ip = IpmsgServer("denzow", "denzow_group", 2721)

# start server
ip.start()


# send message
packet_no = ip.send_message("192.168.1.xx", "hello")

# check succeed?( should wait some seconds.)
ip.check_sended_message(packet_no)

# get host info
testusers_info = ip.get_hostinfo_by_nickname("testuser")
packet_no = ip.send_message(testusers_info.addr, "hello")

# send message use nickname without ip addr
packet_no = ip.send_message_by_nickname("", "hello")

# send message use fuzzy nickname without ip addr
packet_no = ip.send_message_by_fuzzy_nickname("", "hello")


# stop server
# wait stop thread and close socket.
ip.stop()

限制

  • 不要使用附加文件。
  • 不加密

待办事项

  • 发送机密消息
  • 接收机密消息
  • 通过getlist以外的其他方式正确注册hostinfo
  • 当RCV BRXEXT删除主机列表。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何修复尝试将用户签名到服务器主机时出现的“字符串无法转换为json对象”错误?   控制台Java:不使用新行更新命令行中的文本   java servlet接收xml数据时,出现错误   使用REST API在Bitbucket中复制或复制存储库   java如何在JavaFX中对齐一行?   java如何在活动中显示通过服务获得的数据?   返回BigDecimal作为字符串:返回int   java组织。openqa。硒。InvalidSelectorException:尝试查找元素时选择器无效   java仅在阻塞状态下通知和通知所有影响线程   java JBOSS无法启动部署   java方法的返回值能保证类型安全吗?   JavaeShadoop序列化组织。阿帕奇。hadoop。木卫一。短写失败   java如果我在同一个类上同步了两个方法,它们能同时运行吗?   不使用java数据库的spring分页实现   java如何将字符串切碎成这样的数组?