Skip to content

Commit

Permalink
chore: include Engine.IO v5
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Mar 10, 2021
1 parent 0107510 commit 1b6d6de
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
10 changes: 6 additions & 4 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type ParentNspNameMatchFn = (
interface EngineOptions {
/**
* how many ms without a pong packet to consider the connection closed
* @default 5000
* @default 20000
*/
pingTimeout: number;
/**
Expand Down Expand Up @@ -93,10 +93,12 @@ interface EngineOptions {
httpCompression: boolean | object;
/**
* what WebSocket server implementation to use. Specified module must
* conform to the ws interface (see ws module api docs). Default value is ws.
* An alternative c++ addon is also available by installing uws module.
* conform to the ws interface (see ws module api docs).
* An alternative c++ addon is also available by installing eiows module.
*
* @default `require("ws").Server`
*/
wsEngine: string;
wsEngine: Function;
/**
* an optional packet which will be concatenated to the handshake packet emitted by Engine.IO.
*/
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"accepts": "~1.3.4",
"base64id": "~2.0.0",
"debug": "~4.3.1",
"engine.io": "~4.1.0",
"engine.io": "~5.0.0",
"socket.io-adapter": "~2.2.0",
"socket.io-parser": "~4.0.3"
},
Expand Down
8 changes: 4 additions & 4 deletions test/socket.io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ describe("socket.io", () => {
});
request
.options("http://localhost:54013/socket.io/default/")
.query({ transport: "polling" })
.query({ transport: "polling", EIO: 4 })
.set("Origin", "http://localhost:54023")
.end((err, res) => {
expect(res.status).to.be(204);
Expand Down Expand Up @@ -256,7 +256,7 @@ describe("socket.io", () => {
});
request
.get("http://localhost:54014/socket.io/default/")
.query({ transport: "polling" })
.query({ transport: "polling", EIO: 4 })
.set("Origin", "http://localhost:54024")
.end((err, res) => {
expect(res.status).to.be(200);
Expand All @@ -276,7 +276,7 @@ describe("socket.io", () => {

request
.get("http://localhost:54022/socket.io/default/")
.query({ transport: "polling" })
.query({ transport: "polling", EIO: 4 })
.end((err, res) => {
expect(res.status).to.be(200);
done();
Expand All @@ -290,7 +290,7 @@ describe("socket.io", () => {
request
.get("http://localhost:54023/socket.io/default/")
.set("origin", "http://foo.example")
.query({ transport: "polling" })
.query({ transport: "polling", EIO: 4 })
.end((err, res) => {
expect(res.status).to.be(403);
done();
Expand Down

0 comments on commit 1b6d6de

Please sign in to comment.