Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement connection state recovery #338

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

Frank3K
Copy link
Contributor

@Frank3K Frank3K commented Jul 28, 2023

In socket.io version 4.6.0 a feature called connection state recovery has been added. This feature is described as follows:

This feature allows a client to reconnect after a temporary disconnection and restore its ID and receive any packets that was missed during the disconnection gap. It must be enabled on the server side.

This PR adds support for connection state recovery to socket.io-client-dart. The implementation has been ported from socketio/socket.io-client@b4e20c5.

Even though the README says Port of awesome JavaScript Node.js library - Socket.io-client v2.0.1~v3.0.3 - in Dart, we did not need to port any other changes from versions between 3.0.3 and 4.6.0. We have validated the code in this PR by connecting to a server running socket.io version 4.6.1.

@jumperchen jumperchen merged commit a36d9e9 into rikulo:master Jul 31, 2023
@jumperchen
Copy link
Member

Thanks for the contribution.

jumperchen added a commit that referenced this pull request Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants