chore: update readme

This commit is contained in:
2021-05-15 09:05:09 +08:00
parent a9fb9bb468
commit 29734dddf6

View File

@@ -1,2 +1,50 @@
# 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>"
}
```