v0.14.0
Changelog
socketioxide
- (Breaking): State reworked to avoid having unsafe global mutable state (issue #317). Therefore State types must now implement
Clone
and will be cloned for each handler where the state is used. - (Breaking): Extensions reworked to avoid
Send
+Sync
requirements on extensions (issue #295). They are now extracted byCloning
. Therefore all the type must implementClone
. AnExtension
extractor is available to get an extension directly without callingsocket.extensions.get()
. - feat: New
HttpExtension
types to extract extensions from the http request. - feat:
SocketIo
can now be used as an extractor. So you can now easily access the entire socket.io context from your handlers. - feat: Dynamic namespaces. You can know set dynamic namespaces with the
dyn_ns
function. You can specify patterns with the{name}
syntax thanks to the matchit crate. The dynamic namespace will create a child namespace for any path that matches the given pattern with the given handler.
What's Changed
- chore(deps): update tokio-tungstenite requirement from 0.21.0 to 0.23.0 by @dependabot in #326
- feat(socketio/extensions): rework extensions and add an
Extension
decorator and anHttpExtension
decorator by @Totodore in #309 - chore(deps): remove useless dashmap dep and improve doc by @Totodore in #328
- Feat: io client shared in socketdata by @Totodore in #327
- doc: fix useless links by @Totodore in #329
- chore(ci): bench only on main and on manual trigger by @Totodore in #332
- feat: per client state by @Totodore in #330
- feat: remove config from socket by @Totodore in #331
- feat(socketio/packet): switch to
Str
type for ns path storage by @Totodore in #334 - chore(deps): bump ws and engine.io-client in /examples/loco-rooms-chat/client by @dependabot in #336
- chore(deps-dev): bump braces from 3.0.2 to 3.0.3 in /examples/loco-rooms-chat/client by @dependabot in #337
- chore(deps): bump ws and engine.io-client in /examples/react-rooms-chat/client by @dependabot in #338
- chore(deps-dev): bump braces from 3.0.2 to 3.0.3 in /examples/react-rooms-chat/client by @dependabot in #339
- feat: namespace routing by @Totodore in #333
- fix: add generic ns path to avoid
.into()
everywhere in packet by @Totodore in #340 - feat: Namespace key in map as
Str
by @Totodore in #342 - feat: Namespace key in map as
Str
by @Totodore in #343
Full Changelog: v0.13.1...v0.14.0