Skip to content

Commit 1b6d6de

Browse files
chore: include Engine.IO v5
Release notes: https://github.com/socketio/engine.io/releases/tag/5.0.0
1 parent 0107510 commit 1b6d6de

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

lib/index.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type ParentNspNameMatchFn = (
4343
interface EngineOptions {
4444
/**
4545
* how many ms without a pong packet to consider the connection closed
46-
* @default 5000
46+
* @default 20000
4747
*/
4848
pingTimeout: number;
4949
/**
@@ -93,10 +93,12 @@ interface EngineOptions {
9393
httpCompression: boolean | object;
9494
/**
9595
* what WebSocket server implementation to use. Specified module must
96-
* conform to the ws interface (see ws module api docs). Default value is ws.
97-
* An alternative c++ addon is also available by installing uws module.
96+
* conform to the ws interface (see ws module api docs).
97+
* An alternative c++ addon is also available by installing eiows module.
98+
*
99+
* @default `require("ws").Server`
98100
*/
99-
wsEngine: string;
101+
wsEngine: Function;
100102
/**
101103
* an optional packet which will be concatenated to the handshake packet emitted by Engine.IO.
102104
*/

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"accepts": "~1.3.4",
5252
"base64id": "~2.0.0",
5353
"debug": "~4.3.1",
54-
"engine.io": "~4.1.0",
54+
"engine.io": "~5.0.0",
5555
"socket.io-adapter": "~2.2.0",
5656
"socket.io-parser": "~4.0.3"
5757
},

test/socket.io.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ describe("socket.io", () => {
228228
});
229229
request
230230
.options("http://localhost:54013/socket.io/default/")
231-
.query({ transport: "polling" })
231+
.query({ transport: "polling", EIO: 4 })
232232
.set("Origin", "http://localhost:54023")
233233
.end((err, res) => {
234234
expect(res.status).to.be(204);
@@ -256,7 +256,7 @@ describe("socket.io", () => {
256256
});
257257
request
258258
.get("http://localhost:54014/socket.io/default/")
259-
.query({ transport: "polling" })
259+
.query({ transport: "polling", EIO: 4 })
260260
.set("Origin", "http://localhost:54024")
261261
.end((err, res) => {
262262
expect(res.status).to.be(200);
@@ -276,7 +276,7 @@ describe("socket.io", () => {
276276

277277
request
278278
.get("http://localhost:54022/socket.io/default/")
279-
.query({ transport: "polling" })
279+
.query({ transport: "polling", EIO: 4 })
280280
.end((err, res) => {
281281
expect(res.status).to.be(200);
282282
done();
@@ -290,7 +290,7 @@ describe("socket.io", () => {
290290
request
291291
.get("http://localhost:54023/socket.io/default/")
292292
.set("origin", "http://foo.example")
293-
.query({ transport: "polling" })
293+
.query({ transport: "polling", EIO: 4 })
294294
.end((err, res) => {
295295
expect(res.status).to.be(403);
296296
done();

0 commit comments

Comments
 (0)