-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: split the events of the Manager and Socket
Previously, most of the events emitted by the Manager were also emitted by the Socket instances, but it was somehow misleading for the end users because they don't have the same meaning: - Manager: the state of the low-level connection (with connection and reconnection events) - Socket: the state of the connection to the Namespace (only 'connect', 'disconnect' and 'error') For example, the `reconnect` event: ```js socket.on("reconnect", () => { console.log(socket.connected); // might be false, which is a bit surprising }); ``` Breaking change: the Socket instance will no longer forward the events of its Manager Those events can still be accessed on the Manager instance though: ```js socket.io.on("reconnect", () => { // ... }); ```
- Loading branch information
1 parent
6cd2e4e
commit 132f8ec
Showing
5 changed files
with
52 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.