因为本人在做测试的原因,所以目前来讲是由本地模拟websocket服务器发送信息,代码如下:
a = [['{"type":"connected"}', 0.02992081642150879], [
'{"name": "jinku00", "_create_time": "1597808952003668224", "id": "video_info:162c8ec6bb1e2900", "type": "video_create"}',
12.115244626998901], [
'{"num": "1", "ware_house_num": "0", "other": "0", "part": "0", "numid": "1", "ware_houseid": "0", "otherid": "0", "partid": "0", "_create_time": "1597808953300124160", "video_id": "video_info:162c8ec6bb1e2900", "type": "video_data", "time": 0.7333333333333333, "boxes": [{"x": "0.8818798065185547", "y": "0.8039905124240452", "w": "0.10922565460205078", "h": "0.18708140055338543", "track_id": "1", "area_forbidden": "0", "area_password": "0", "time_since_update": "0", "_create_time": "1597808953299739904"}]}',
13.412984371185303], [
'{"num": "0", "ware_house_num": "0", "other": "0", "part": "7", "numid": "0", "ware_houseid": "0", "otherid": "0", "partid": "-1", "_create_time": "1597809235015614720", "video_id": "video_info:162c8ec6bb1e2900", "type": "video_data", "time": 193.4, "boxes": [{"x": "0.8702903747558594", "y": "0.7768634937427662", "w": "0.12263660430908203", "h": "0.21259403935185187", "track_id": "1", "area_forbidden": "0", "area_password": "0", "time_since_update": "39", "_create_time": "1597809235014929920"}, {"x": "0.850169817606608", "y": "0.8524787055121528", "w": "0.08584976196289062", "h": "0.13751458062065972", "track_id":