improve doc
This commit is contained in:
@@ -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 sends the message to his server
|
||||||
**John** --("hello" on: )-> **S1**
|
**John** --("hello" on: )-> **S1**
|
||||||
( - "s1-and-s2" )
|
( - "s1-and-s2" )
|
||||||
( - "car-warranty" )
|
( - "car-warranty" )
|
||||||
|
|
||||||
S2 subscribed to "s1-and-s2", so S1 sends this message to S2
|
S2 subscribed to "s1-and-s2", so S1 sends this message to S2
|
||||||
**S1** --("hello" on: )-> **S2**
|
**S1** --("hello" on: )-> **S2**
|
||||||
( - "s1-and-s2" )
|
( - "s1-and-s2" )
|
||||||
( - "car-warranty" )
|
( - "car-warranty" )
|
||||||
|
|
||||||
Bob subscribed to "car-warranty", so S2 sends this message to Bob
|
Bob subscribed to "car-warranty", so S2 sends this message to Bob
|
||||||
**S2** --("hello" on: )-> **Bob**
|
**S2** --("hello" on: )-> **Bob**
|
||||||
( - "s1-and-s2" )
|
( - "s1-and-s2" )
|
||||||
( - "car-warranty" )
|
( - "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.
|
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.
|
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**.
|
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:
|
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)
|
- `http://` or `https://` (the secure variant) are protocols to request data and receive a single response
|
||||||
- You will need to **replace `http` with `ws`**:
|
- 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`
|
- `http://192.168.0.100:3000` -> `ws://192.168.0.100:3000`
|
||||||
- `https://192.168.0.200:3000` -> `wss://192.168.0.200: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"
|
"wss://192.168.0.200:3000"
|
||||||
],
|
],
|
||||||
"subscribedChannels": [
|
"subscribedChannels": [
|
||||||
"blue", "purple"
|
"secondary-channel-1",
|
||||||
|
"secondary-channel-2"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user