""" """ # from hub import methods, Global from werkzeug.security import check_password_hash import struct import asyncio import time import socket import sys import importlib # --- for linux # sys.path.append('/home/sri/repositories/repositories/SRI-DINO.Server-py/sri-server-bg03') # sys.path.append('/home/sri/repositories/repositories/SRI-DINO.Server-py/sri-pysdk') # --- for windows sys.path.append(r'C:\SRI-DINO.Server-py\sri-server-bg03') sys.path.append(r'C:\SRI-DINO.Server-py\sri-pysdk') protobuf = importlib.import_module(f"xprotobuf.protocol_pb2") methods = importlib.import_module(f"xlib") mdb = importlib.import_module(f"xclient.xmongo").Client(host='127.0.0.1', port=47017, database='bg', username='admin', password='admin') 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 } # live_relationship = {} # {id-2>: True} class SRIConnection(asyncio.Protocol): """""" head_sequence = '