添加数据包序号提示

This commit is contained in:
murmur 2023-03-22 11:26:46 +08:00
parent 02a4d37cc3
commit 7d9921b026

View File

@ -221,10 +221,25 @@ def check_valid(data):
return bytearray(data[:])
def get_info(data):
# print(type(data[12]))
o=0
def h2s(x):
# x= int.from_bytes(x)
return str(x)
pass
sn = "-".join(list(map(h2s,data[12:17])))
index=int.from_bytes(data[19:20])
cnt=int.from_bytes(data[20:21])
t=f"流水号20{sn}[{index}/{cnt}]"
print(t)
s2wx("","",t)
def tt_trans(addr, data):
"""发送数据到指定ccid"""
get_info(data)
sccid = get_ccid(addr)
if not sccid:
return -1
@ -322,7 +337,7 @@ def tt_decode(addr, data):
class MyServer(socketserver.BaseRequestHandler):
def setup(self):
self.request.settimeout(60*2)
self.err = ""
self.err = " "
def handle(self): # 回调
add_timestamp()