아이디 정의

This commit is contained in:
2025-09-20 13:54:47 +09:00
parent c5d116d73a
commit 52af7ab6f5

View File

@@ -12,6 +12,7 @@ wss.on('connection', (ws) => {
ws.on('message', (data) => {
const msg = JSON.parse(data);
console.log(msg)
if(msg.type === 'login') {
peers.set(msg.sabun, ws);
ws.send(JSON.stringify({ type: 'your-id',id: msg.sabun }));