MyGit

4.0.0

socketio/socket.io

版本发布时间: 2021-03-10 19:49:47

socketio/socket.io最新发布版本:2.5.1(2024-06-19 17:36:33)

Blog post: https://socket.io/blog/socket-io-4-release/ Migration guide: https://socket.io/docs/v3/migrating-from-3-x-to-4-0/

Bug Fixes

Features

BREAKING CHANGES

Previously, broadcasting to a given room (by calling io.to()) would mutate the io instance, which could lead to surprising behaviors, like:

io.to("room1");
io.to("room2").emit(/* ... */); // also sent to room1

// or with async/await
io.to("room3").emit("details", await fetchDetails()); // random behavior: maybe in room3, maybe to all clients

Calling io.to() (or any other broadcast modifier) will now return an immutable instance.

Links:

相关地址:原始地址 下载(tar) 下载(zip)

查看:2021-03-10发行的版本