from socket import *

# 利用socket模块生成套接字
s = socket(AF_INET, SOCK_DGRAM)

# 定义一个元组,包含ip地址,和端口号,ip地址必须为字符串,端口号为
# 数字 飞秋的默认端口为2425
add = ("10.36.136.1", 2425)
while True:  # 设置无线循环
    # 1版本:包号:昵称:主机名:32发送消息:发送内容
    # 这个字符串为飞秋的震动报文
    Str = "1_lbt4_0#128#000C29D68D8F#0#0#0#2.5a:1399716676:%s:%s:209:."
    data = "1:525:我:秦始皇:32:打钱"
    # 完成发送
    s.sendto(data.encode("utf-8"), add)

s.close()

results matching ""

    No results matching ""