mirror of
https://git.hmsn.ink/call/signal-server.git
synced 2026-03-20 00:02:16 +09:00
아이디 정의
This commit is contained in:
@@ -12,6 +12,7 @@ wss.on('connection', (ws) => {
|
|||||||
|
|
||||||
ws.on('message', (data) => {
|
ws.on('message', (data) => {
|
||||||
const msg = JSON.parse(data);
|
const msg = JSON.parse(data);
|
||||||
|
console.log(msg)
|
||||||
if(msg.type === 'login') {
|
if(msg.type === 'login') {
|
||||||
peers.set(msg.sabun, ws);
|
peers.set(msg.sabun, ws);
|
||||||
ws.send(JSON.stringify({ type: 'your-id',id: msg.sabun }));
|
ws.send(JSON.stringify({ type: 'your-id',id: msg.sabun }));
|
||||||
|
|||||||
Reference in New Issue
Block a user