You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/en/tutorials/socketio.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
## title: Socket.IO
2
2
3
-
**Socket.IO** is a real-time application framework based on Node.js, which has a wide range of applications including instant messaging, notification and message push, real-time analysis and other scenarios.
3
+
**Socket.IO** is a real-time application framework based on Node.js, which has a wide range of applications including instant messaging, notification and message push, real-time analysis and other scenarios.
4
4
5
5
WebSocket originated from the growing demand for real-time communication in web development, compared with http-based polling, which greatly saves network bandwidth and reduces server performance consumption. [Socket.IO] supports both websockets and polling. The data transmission method is compatible with the browser and does not support the communication requirements under the WebSocket scenario.
6
6
@@ -19,7 +19,7 @@ The framework provides the [egg-socket.io] plugin with the following development
19
19
$ npm i egg-socket.io --save
20
20
```
21
21
22
-
**Enable the plugin:**
22
+
**Enable the plugin:**
23
23
24
24
```js
25
25
// {app_root} /config/plugin.js
@@ -61,7 +61,9 @@ exports.io = {
61
61
};
62
62
```
63
63
64
-
** redis: **
64
+
> As µWS engine has been deprecated, maybe you should consider the default engine.
65
+
66
+
**redis:**
65
67
66
68
[egg-socket.io] has built-in redis support via `socket.io-redis`. In cluster mode, the use of redis can make it relatively simple to achieve information sharing of clients/rooms and so on
67
69
@@ -100,7 +102,7 @@ Modify the `npm scripts` script in`package.json`:
100
102
}
101
103
```
102
104
103
-
**Nginx configuration**
105
+
**Nginx configuration**
104
106
105
107
```
106
108
location / {
@@ -317,7 +319,7 @@ Module.exports = app => {
317
319
};
318
320
```
319
321
320
-
**Note:** Each socket connection will have a random and unpredictable unique id `Socket#id` and will automatically be added to the room named after this `id`
322
+
**Note:** Each socket connection will have a random and unpredictable unique id `Socket#id` and will automatically be added to the room named after this `id`
0 commit comments