|
@ -6,18 +6,18 @@ server.on('connection', socket => { |
|
|
|
|
|
|
|
|
socket.on('message', message => { |
|
|
socket.on('message', message => { |
|
|
console.log(`Received message => ${message}`) |
|
|
console.log(`Received message => ${message}`) |
|
|
let msg = { |
|
|
|
|
|
command: 'detection_completed', |
|
|
|
|
|
result: { |
|
|
|
|
|
imgUrl: |
|
|
|
|
|
'https://www.whyknown.com/static/img/5e713df34d58da23e47fe08ee3634440.clipboard-2022-09-16.png', |
|
|
|
|
|
detection_result_top: 'YQT0DB', |
|
|
|
|
|
detection_result_bottom: 'FBNA0T1E', |
|
|
|
|
|
taskId: '21', |
|
|
|
|
|
coord: '1-6', |
|
|
|
|
|
}, |
|
|
|
|
|
} |
|
|
|
|
|
socket.send(JSON.stringify(msg)) |
|
|
|
|
|
|
|
|
// let msg = { |
|
|
|
|
|
// command: 'detection_completed', |
|
|
|
|
|
// result: { |
|
|
|
|
|
// imgUrl: |
|
|
|
|
|
// 'https://www.whyknown.com/static/img/5e713df34d58da23e47fe08ee3634440.clipboard-2022-09-16.png', |
|
|
|
|
|
// detection_result_top: 'YQT0DB', |
|
|
|
|
|
// detection_result_bottom: 'FBNA0T1E', |
|
|
|
|
|
// taskId: '21', |
|
|
|
|
|
// coord: '1-6', |
|
|
|
|
|
// }, |
|
|
|
|
|
// } |
|
|
|
|
|
// socket.send(JSON.stringify(msg)) |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
socket.on('close', () => { |
|
|
socket.on('close', () => { |
|
|