Skip to content

Commit

Permalink
doc (socket.io): Make 'uws' cannot use anymore clear (#3068)
Browse files Browse the repository at this point in the history
Due to the issue that the author hasn't updated and destoyed the lib. So
we have to clarify it.
  • Loading branch information
Maledong authored and dead-horse committed Oct 8, 2018
1 parent 0d6798d commit 4c6fb2a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
10 changes: 5 additions & 5 deletions docs/source/en/tutorials/socketio.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ exports.io = {

> Namespaces are `/` and `/ example`, not`example`
**uws:**
#### uws

If you want to use [uws] instead of the default `ws` you can do the following configuration
**Egg's socket is using `ws`, [uws](https://www.npmjs.com/package/uws) is deprecated due to [some reasons](https://github.com/socketio/socket.io/issues/3319).**

If you insist using [uws](https://www.npmjs.com/package/uws) instead of the default `ws`, you can config like this:

```js
// {app_root} / config / config. $ {env} .js
Expand All @@ -61,9 +63,7 @@ exports.io = {
};
```

> As µWS engine has been deprecated, maybe you should consider the default engine.
**redis:**
#### redis

[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

Expand Down
13 changes: 5 additions & 8 deletions docs/source/zh-cn/tutorials/socketio.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ exports.io = {

> 命名空间为 `/``/example`, 不是 `example`
**uws:**
#### uws

如果想要使用 [uws] 替代默认的 `ws` 可以做如下配置
**Egg Socket 内部默认使用 `ws` 引擎,[uws](https://www.npmjs.com/package/uws) 因为[某些原因](https://github.com/socketio/socket.io/issues/3319)被废止。**

如坚持需要使用,请按照以下配置即可:

```js
// {app_root}/config/config.${env}.js
Expand All @@ -62,12 +64,7 @@ exports.io = {
};
```

> ~~已知默认 `wsEngine``Chrome` 浏览器中断开连接存在异常,建议优先使用 [uws]~~
>
> µWS 不再建议使用,请优先考虑默认引擎。

**redis:**
#### redis

[egg-socket.io] 内置了 `socket.io-redis`,在 cluster 模式下,使用 redis 可以较为简单的实现 clients/rooms 等信息共享

Expand Down

0 comments on commit 4c6fb2a

Please sign in to comment.