-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: socketio/socket.io
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4.3.2
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: socketio/socket.io
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4.4.0
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 8 commits
- 21 files changed
- 2 contributors
Commits on Nov 8, 2021
-
feat: add type information to
socket.data
(#4159)Usage: ```js interface SocketData { name: string; age: number; } const io = new Server<ClientToServerEvents, ServerToClientEvents, InterServerEvents, SocketData>(); io.on("connection", (socket) => { socket.data.name = "john"; socket.data.age = 42; }); ```
Configuration menu - View commit details
-
Copy full SHA for fe8730c - Browse repository at this point
Copy the full SHA fe8730cView commit details
Commits on Nov 12, 2021
-
feat: add an implementation based on uWebSockets.js
Usage: ```js const { App } = require("uWebSockets.js"); const { Server } = require("socket.io"); const app = new App(); const server = new Server(); server.attachApp(app); app.listen(3000); ``` The Adapter prototype is updated so we can benefit from the publish functionality of uWebSockets.js, so this will apply to all adapters extending the default adapter. Reference: https://github.com/uNetworking/uWebSockets.js Related: - #3601 - socketio/engine.io#578
Configuration menu - View commit details
-
Copy full SHA for c0d8c5a - Browse repository at this point
Copy the full SHA c0d8c5aView commit details -
fix: only set 'connected' to true after middleware execution
The Socket instance is only considered connected when the "connection" event is emitted, and not during the middleware(s) execution. ```js io.use((socket, next) => { console.log(socket.connected); // prints "false" next(); }); io.on("connection", (socket) => { console.log(socket.connected); // prints "true" }); ``` Related: #4129
Configuration menu - View commit details
-
Copy full SHA for 02b0f73 - Browse repository at this point
Copy the full SHA 02b0f73View commit details
Commits on Nov 16, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 2da8210 - Browse repository at this point
Copy the full SHA 2da8210View commit details -
`srv.close()` only closes the underlying HTTP server, but this does not terminate the existing WebSocket connections. Reference: https://nodejs.org/api/http.html#serverclosecallback
Configuration menu - View commit details
-
Copy full SHA for b7213e7 - Browse repository at this point
Copy the full SHA b7213e7View commit details -
Usage: ```js socket.timeout(5000).emit("my-event", (err) => { if (err) { // the client did not acknowledge the event in the given delay } }); ```
Configuration menu - View commit details
-
Copy full SHA for f0ed42f - Browse repository at this point
Copy the full SHA f0ed42fView commit details
Commits on Nov 18, 2021
-
fix: prevent double ack when emitting with a timeout
The ack was not properly removed upon timeout, and could be called twice. Related: f0ed42f
Configuration menu - View commit details
-
Copy full SHA for b839a3b - Browse repository at this point
Copy the full SHA b839a3bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f11c47 - Browse repository at this point
Copy the full SHA 0f11c47View commit details
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.