# room-rs ENV: ``` PASS=pass ./target/debug/room-rs ``` Slash commands: * /exit - close current websocket * /statics - show statics * /pass <pass> - set pass * /rooms - show rooms * /room <room id> - show room clients * /version - show version\[admin] * /time - show time # Message format Enter room: ```json { "type": "Enter", "roomId": "", "clientId": "" } ``` Exit room: ```json { "type": "Exit" } ``` Destroy room: ```json { "type": "Destroy" } ``` List room peers: ```json { "type": "ListPeers" } ``` Broadcast room message: ```json { "type": "Broadcast", "data": "" } ``` Send room peer message: ```json { "type": "Peer", "peerId": "", "data": "" } ``` Test with command line: > WebSocket cat: https://www.npmjs.com/package/wscat Install `wscat` with `npm`: ```shell npm install -g wscat ```