chore: update readme
This commit is contained in:
48
README.md
48
README.md
@@ -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>"
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user