""" todo 1、存在消息被异步多次处理的问题 """ # from hub import methods, Global import struct import asyncio import time import socket import sys import importlib # --- for linux sys.path.append('/home/sri/repositories/repositories/sri-project.demo-py/sri-dino-pyserver01') sys.path.append('/home/sri/repositories/repositories/sri-project.demo-py/sri-pysdk') protobuf = importlib.import_module(f"xprotobuf.protocol_pb2") methods = importlib.import_module(f"xlib") clients = {} # {: (socket, update_at, type)} | {<连接id>: (socket对象, 最后一次请求时间, 客户端类型)} serial_rid_dict = { '65F7171A-5585-46C7-A9D6-967ABA9EB223': 1000000, '7AF3F619-5067-4EE0-A710-89A6CB097EFE': 1000001, 'ECB93A87-560B-4022-8C5F-CBF9FE1E596A': 1000002, 'C0D14B6F-0FF0-4B68-877D-D2CB886FCD0E': 1000002, 'E537DDFB-6E3E-4E1A-AD18-AC21393BE300': 1000004, # 正在使用 } account_uid_dict = { 'ego': 3 } class SRIConnection(asyncio.Protocol): """""" head_sequence = '