diff --git a/Source/Services/DataTransfer.js b/Source/Services/DataTransfer.js index b168dc9..5aff745 100644 --- a/Source/Services/DataTransfer.js +++ b/Source/Services/DataTransfer.js @@ -19,7 +19,8 @@ addService(({ global, message, next, - response + response, + messageId }) => { let {type} = message; switch(type) @@ -50,7 +51,7 @@ addService(({ break; } case "request/to":{ - let {to,pack, id} = message; + let {to,pack} = message; if(Client.clients.has(to)) { let otherPeer = Client.clients.get(to); @@ -61,7 +62,7 @@ addService(({ otherPeer.send([{ from: client.id, pack: pack, - id + id:messageId }, 'request']); }; break; diff --git a/Source/WebSocket.js b/Source/WebSocket.js index 6d94da1..470e41e 100644 --- a/Source/WebSocket.js +++ b/Source/WebSocket.js @@ -108,6 +108,7 @@ async function emitService(global, client, id, payload, action) action, client, global, + messageId: id, response:(obj)=>{ client.send([obj, id, 'C']) // continue ([C]ONTINUE flag) },