Skip to content

Commit 1f640a2

Browse files
chore(release): 6.5.0
Diff: 6.4.2...6.5.0
1 parent 1bfa9cd commit 1f640a2

File tree

3 files changed

+98
-29
lines changed

3 files changed

+98
-29
lines changed

CHANGELOG.md

+86
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## 2023
44

5+
- [6.5.0](#650-2023-06-16) (Jun 2023)
56
- [6.4.2](#642-2023-05-02) (May 2023)
67
- [6.4.1](#641-2023-02-20) (Feb 2023)
78
- [6.4.0](#640-2023-02-06) (Feb 2023)
@@ -47,6 +48,91 @@
4748

4849
# Release notes
4950

51+
## [6.5.0](https://github.com/socketio/engine.io/compare/6.4.2...6.5.0) (2023-06-16)
52+
53+
54+
### Bug Fixes
55+
56+
* **uws:** discard any write to an aborted uWS response ([#682](https://github.com/socketio/engine.io/issues/682)) ([3144d27](https://github.com/socketio/engine.io/commit/3144d274584ae3b96cca4e609c66c56d534f1715))
57+
58+
59+
### Features
60+
61+
#### Support for WebTransport
62+
63+
The Engine.IO server can now use WebTransport as the underlying transport.
64+
65+
WebTransport is a web API that uses the HTTP/3 protocol as a bidirectional transport. It's intended for two-way communications between a web client and an HTTP/3 server.
66+
67+
References:
68+
69+
- https://w3c.github.io/webtransport/
70+
- https://developer.mozilla.org/en-US/docs/Web/API/WebTransport
71+
- https://developer.chrome.com/articles/webtransport/
72+
73+
Until WebTransport support lands [in Node.js](https://github.com/nodejs/node/issues/38478), you can use the `@fails-components/webtransport` package:
74+
75+
```js
76+
import { readFileSync } from "fs";
77+
import { createServer } from "https";
78+
import { Server } from "engine.io";
79+
import { Http3Server } from "@fails-components/webtransport";
80+
81+
// WARNING: the total length of the validity period MUST NOT exceed two weeks (https://w3c.github.io/webtransport/#custom-certificate-requirements)
82+
const cert = readFileSync("/path/to/my/cert.pem");
83+
const key = readFileSync("/path/to/my/key.pem");
84+
85+
const httpsServer = createServer({
86+
key,
87+
cert
88+
});
89+
90+
httpsServer.listen(3000);
91+
92+
const engine = new Server({
93+
transports: ["polling", "websocket", "webtransport"] // WebTransport is not enabled by default
94+
});
95+
96+
engine.attach(httpsServer);
97+
98+
const h3Server = new Http3Server({
99+
port: 3000,
100+
host: "0.0.0.0",
101+
secret: "changeit",
102+
cert,
103+
privKey: key,
104+
});
105+
106+
(async () => {
107+
const stream = await h3Server.sessionStream("/engine.io/");
108+
const sessionReader = stream.getReader();
109+
110+
while (true) {
111+
const { done, value } = await sessionReader.read();
112+
if (done) {
113+
break;
114+
}
115+
engine.onWebTransportSession(value);
116+
}
117+
})();
118+
119+
h3Server.startServer();
120+
```
121+
122+
Added in [123b68c](https://github.com/socketio/engine.io/commit/123b68c04f9e971f59b526e0f967a488ee6b0116).
123+
124+
125+
### Credits
126+
127+
Huge thanks to [@OxleyS](https://github.com/OxleyS) for helping!
128+
129+
130+
### Dependencies
131+
132+
- [`ws@~8.11.0`](https://github.com/websockets/ws/releases/tag/8.11.0) (no change)
133+
134+
135+
50136
## [6.4.2](https://github.com/socketio/engine.io/compare/6.4.1...6.4.2) (2023-05-02)
51137

52138
:warning: This release contains an important security fix :warning:

package-lock.json

+10-27
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "engine.io",
3-
"version": "6.4.2",
3+
"version": "6.5.0",
44
"description": "The realtime engine behind Socket.IO. Provides the foundation of a bidirectional connection between client and server",
55
"type": "commonjs",
66
"main": "./build/engine.io.js",
@@ -46,7 +46,7 @@
4646
"@fails-components/webtransport": "^0.1.7",
4747
"babel-eslint": "^8.0.2",
4848
"eiows": "^4.1.2",
49-
"engine.io-client": "6.4.0",
49+
"engine.io-client": "6.5.0",
5050
"engine.io-client-v3": "npm:[email protected]",
5151
"expect.js": "^0.3.1",
5252
"express-session": "^1.17.3",

0 commit comments

Comments
 (0)