Basic Deno WebSocket server for WebRTC signaling or simply "P2P" communication.
Or use wss://rooms.deno.dev
const roomId = "my room id"
const ws = new WebSocket("wss://rooms.deno.dev/" + roomId);
// broadcast message to all peers in the room except the sender.
ws.send("Hello world")
// receive broadcasts
ws.onmessage = console.log
It is possible to not add a room ID, but it is not suggested.
- This can be used for WebRTC signaling without a server.
- Simple room chat.
Right now, there are no rate limiting policies. However...
- D.O.S.
- Or do anything stupid...
- Send lots of data. (use WebRTC)
- Using this in production. (I might shut it down)
- May not receive broadcasts from different regions of the world. (Will soon use the BroadcastChannel API of Deno Deploy to fix this.)
MIT