improve doc

This commit is contained in:
marlon-erler
2024-07-08 16:35:06 +02:00
parent 04897c78be
commit 4daa4fd3ad
+12 -10
View File
@@ -75,18 +75,18 @@ Then, John will send his messages on both "s1-and-s2" and "car-warranty". As alw
John sends the message to his server
**John** --("hello" on: )-> **S1**
( - "s1-and-s2" )
( - "car-warranty" )
( - "s1-and-s2" )
( - "car-warranty" )
S2 subscribed to "s1-and-s2", so S1 sends this message to S2
**S1** --("hello" on: )-> **S2**
( - "s1-and-s2" )
( - "car-warranty" )
( - "s1-and-s2" )
( - "car-warranty" )
Bob subscribed to "car-warranty", so S2 sends this message to Bob
**S2** --("hello" on: )-> **Bob**
( - "s1-and-s2" )
( - "car-warranty" )
( - "s1-and-s2" )
( - "car-warranty" )
```
This requires John to know of "s1-and-s2" and, obviously, Bob to subscribe to "car-warranty". Jane and Alice could agree on their own primary channel and use "s1-and-s2" just like John did.
@@ -112,9 +112,10 @@ As you can see, there are many ways to connect multiple servers and communicate
2. To use an app, **open it in your web browser**. Most apps will install offline support automatically so you can use them on local networks without an internet connection.
3. If you are using a smartphone, **add the app to your homescreen and launch it**.
4. Enter your server address when asked, but note:
- `http://` or `https://` (the secure variant) are protocols to request data and receive a single response
- To send messages, apps use so-called WebSockets instead. Their protocol is `ws://` or `wss://` (the secure variant)
- You will need to **replace `http` with `ws`**:
- `http://` or `https://` (the secure variant) are protocols to request data and receive a single response
- To send messages, apps use so-called WebSockets instead. Their protocol is `ws://` or `wss://` (the secure variant)
- You will need to **replace `http` with `ws`**:
- `http://192.168.0.100:3000` -> `ws://192.168.0.100:3000`
- `https://192.168.0.200:3000` -> `wss://192.168.0.200:3000`
@@ -154,7 +155,8 @@ The port and channels are self-explanatory. For servers, you'll need to provide
"wss://192.168.0.200:3000"
],
"subscribedChannels": [
"blue", "purple"
"secondary-channel-1",
"secondary-channel-2"
]
}
```