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

Bump socketioxide to v0.13.1 #594

Merged
merged 2 commits into from
May 29, 2024

Conversation

Totodore
Copy link
Contributor

@Totodore Totodore commented May 29, 2024

The channels features of loco depends on socketioxide. However it currently depends on an old version of the crate. Bumping
this deps imply breaking changes.

One of the main issue with this update is that starting from v0.12 socketioxide requires a MSRV of 0.75.

Therefore this will be mergeable only for the next loco version. The new version includes importants fixes and some new features:

If this gets accepted I'll also update the chat example https://github.com/loco-rs/chat-rooms.

0.13.1

engineioxide

  • Remove unnecessary panic when receiving unexpected websocket messages. This might happen with some specific socket.io clients.

0.13.0

socketioxide

  • fix: the delete_ns fn was deadlocking the entire server when called from inside a disconnect_handler.
  • feat: the delete_ns is now gracefully closing the adapter as well as all its sockets before being removed.
  • feat: the API use Bytes rather than Vec<u8> to represent binary payloads. This allow to avoid unnecessary copies.
  • deps: use futures-util and futures-core rather than the whole futures crate.

engineioxide

  • feat: the API use Bytes/Str rather than Vec<u8> and String to represent payloads. This allow to avoid unnecessary copies.
  • deps: use futures-util and futures-core rather than the whole futures crate.

0.12.0

MSRV: Minimum supported Rust version is now 1.75.

socketioxide

  • (Breaking): Introduction of connect middlewares. It allows to execute code before the connection to the namespace is established. It is useful to check the request, to authenticate the user, to log the connection etc. It is possible to add multiple middlewares and to chain them.
  • The SocketRef extractor is now Clone. Be careful to drop clones when the socket is disconnected to avoid any memory leak.

0.11.1

socketioxide

  • fix: under heavy traffic, the adjacent binary packet to the head packet requirement for engine.io was not respected. It was leading to a protocol error.

0.11.0

socketioxide

  • fix: a panic was raised sometimes under heavy traffic with socketio v5 when the connect timeout handler is destroyed but that the chan sender is still alive.
  • (Breaking): Emit errors now contains the provided data if there is an issue with the internal channel (for example if it is full) or if the socket closed.
  • (Breaking): Operators are now splitted between Operators and BroadcastOperators in order to split logic and fn signatures between broadcast and non-broadcast operators.

engineioxide

  • fix: with engine.io v3, the message byte prefix 0x4 was not added to the binary payload with ws transport.
  • bump dependency base64 to 0.22.0.

@kaplanelad
Copy link
Contributor

@Totodore Thanks for the upgrade.

I merged this PR, can you please also update the https://github.com/loco-rs/chat-rooms?
you can change the create to be taken directly from the GitHub (master branch)

@kaplanelad kaplanelad merged commit 4cf49db into loco-rs:master May 29, 2024
12 checks passed
@Totodore Totodore deleted the bump-socketioxide-0.13 branch May 29, 2024 14:14
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