50 lines
475 B
Markdown
50 lines
475 B
Markdown
# room-rs
|
|
|
|
# Message format
|
|
|
|
Enter room:
|
|
```json
|
|
{
|
|
"type": "Enter",
|
|
"roomId": "<roomid>",
|
|
"clientId": "<clientid>"
|
|
}
|
|
```
|
|
|
|
Exit room:
|
|
```json
|
|
{
|
|
"type": "Exit"
|
|
}
|
|
```
|
|
|
|
Destroy room:
|
|
```json
|
|
{
|
|
"type": "Destroy"
|
|
}
|
|
```
|
|
|
|
List room peers:
|
|
```json
|
|
{
|
|
"type": "ListPeers"
|
|
}
|
|
```
|
|
|
|
Broadcast room message:
|
|
```json
|
|
{
|
|
"type": "Broadcast",
|
|
"data": "<message>"
|
|
}
|
|
```
|
|
|
|
Send room peer message:
|
|
```json
|
|
{
|
|
"type": "Peer",
|
|
"peerId": "<peerclientid>",
|
|
"data": "<message>"
|
|
}
|
|
``` |