|
@@ -53,8 +53,8 @@ class SRIConnection(asyncio.Protocol):
|
|
"""
|
|
"""
|
|
peername = client.get_extra_info('peername')
|
|
peername = client.get_extra_info('peername')
|
|
# self.connection_id = f"{peername[0].replace('.', '')}-{peername[1]}" # 客户端id
|
|
# self.connection_id = f"{peername[0].replace('.', '')}-{peername[1]}" # 客户端id
|
|
- self.connection_id = int(f"{peername[1]}") # 客户端id(公网情况)
|
|
|
|
- # self.connection_id = int(f"{peername[0].replace('.', '')}") # 客户端id(固定ip情况)
|
|
|
|
|
|
+ # self.connection_id = int(f"{peername[1]}") # 客户端id(公网情况)
|
|
|
|
+ self.connection_id = int(f"{peername[0].replace('.', '')}") # 客户端id(局域网情况)
|
|
self.client = client
|
|
self.client = client
|
|
# self.data = b''
|
|
# self.data = b''
|
|
self.client_type = None
|
|
self.client_type = None
|
|
@@ -620,7 +620,7 @@ class SRIConnection(asyncio.Protocol):
|
|
o3 = protobuf.UserActivityInfo()
|
|
o3 = protobuf.UserActivityInfo()
|
|
o3.user_uuid = 'SSGGSSEEFFHHWWSS' # 用户uuid
|
|
o3.user_uuid = 'SSGGSSEEFFHHWWSS' # 用户uuid
|
|
o3.cockpit_id = self.connection_id # 舱端id
|
|
o3.cockpit_id = self.connection_id # 舱端id
|
|
- o3.vehicle_id = 112233 # 车端id
|
|
|
|
|
|
+ o3.vehicle_id = o1.uid # 车端id
|
|
re_command_id = protobuf.S2V_SendUserInfo # 6011
|
|
re_command_id = protobuf.S2V_SendUserInfo # 6011
|
|
re_body_length = o3.ByteSize()
|
|
re_body_length = o3.ByteSize()
|
|
re_head_data = struct.pack(self.head_sequence, re_command_id, re_body_length)
|
|
re_head_data = struct.pack(self.head_sequence, re_command_id, re_body_length)
|