X-Git-Url: https://git.r.bdr.sh/rbdr/junction/blobdiff_plain/90de3cbb942653f472bc663fc11749117b1f8873..139f43c6caf963d66704fe1675bcc70735e21926:/server/index.js?ds=sidebyside diff --git a/server/index.js b/server/index.js index 56a1df4..37104e1 100644 --- a/server/index.js +++ b/server/index.js @@ -15,7 +15,7 @@ server.on('connection', (socket) => { socket.on('join', (data) => { socket.join(data.url); - const sockets = server.sockets.adapter.rooms.get(data.url); + const sockets = server.of(data.url).sockets.keys(); sockets.forEach((peerId) => { if (peerId !== me) { const peer = server.sockets.sockets.get(peerId) @@ -34,7 +34,7 @@ server.on('connection', (socket) => { }); socket.on('relayICECandidate', (data) => { - const sockets = server.sockets.adapter.rooms.get(data.url); + const sockets = server.of(data.url).sockets.keys(); sockets.forEach((peerId) => { const peer = server.sockets.sockets.get(peerId) peer.emit(events.types.ICE_CANDIDATE_RECEIVED, events.ICECandidateReceived(me, data.ice_candidate)) @@ -44,7 +44,7 @@ server.on('connection', (socket) => { }); socket.on('relaySessionDescription', (data) => { - const sockets = server.sockets.adapter.rooms.get(data.url); + const sockets = server.of(data.url).sockets.keys(); sockets.forEach((peerId) => { const peer = server.sockets.sockets.get(peerId) peer.emit(events.types.SESSION_DESCRIPTION_RECEIVED, events.SessionDescriptionReceived(me, data.session_description))