Releases: Totodore/socketioxide
Releases · Totodore/socketioxide
v0.15.1
Changelog
socketioxide
- deps: remove smallvec deps
- doc: fix some links
engineioxide
- fix: issue #390. First ping was sent twice because of tokio interval behavior defaulting to bursting when interval tick is missed.
What's Changed
- doc: fix doc links by @Totodore in #387
- deps(socketio): remove smallvec dep by @Totodore in #388
- fix(engineio/socket): heartbeat delay causing ping burst by @Totodore in #392
Full Changelog: v0.15.0...v0.15.1
v0.15.0
socketioxide
- (Breaking): New parsing system. You can now serialize and deserialize binary data inside your own types.
It also improve performances by avoiding unnecessary allocations. - fix: missing extractor error logs for async message handlers.
- feat: add custom compiler error for unimplemented handler traits.
- deps: switch from
tower
totower-service
andtower-layer
subcrates. - deps: bump
tokio
to 1.40. - deps: bump
http
to 1.1. - deps: bump
hyper
to 1.5.
What's Changed
- chore(deps): bump micromatch from 4.0.5 to 4.0.8 in /examples/react-rooms-chat/client by @dependabot in #364
- chore(deps): bump micromatch from 4.0.5 to 4.0.8 in /examples/loco-rooms-chat/client by @dependabot in #365
- chore(deps-dev): bump vite from 5.0.13 to 5.4.6 in /examples/react-rooms-chat/client by @dependabot in #368
- chore(ci): switch from node v16 to node v22 for e2e testing by @Totodore in #371
- chore(deps-dev): bump vite from 5.0.13 to 5.4.7 in /examples/loco-rooms-chat/client by @dependabot in #370
- chore(deps): update tokio-tungstenite requirement from 0.23.0 to 0.24.0 by @dependabot in #367
- feat(socketio/parser): Refactor socketioxide parsing by @Totodore in #376
- chore(deps): bump deps and switch to
tower-layer
andtower-service
rather thantower
by @Totodore in #379 - fix(socketio/handler): trace extractor errors by @Totodore in #380
- feat(socketio/handler): Add custom errors for unimplemented handlers by @Totodore in #381
- doc(socketio): improve extractor docs by @Totodore in #382
- chore(deps): prepare v0.15.0 by @Totodore in #383
Full Changelog: v0.14.1...v0.15.0
v0.14.1
What's Changed
- fix(socketio/io): adapter builder by @Totodore in #346
- refactor(test): cargo clippy by @headironc in #349
- doc(example): add webrtc example by @Totodore in #353
- fix: reject invalid binary event (resolve #357) by @yhx-12243 in #358
- chore(deps): v0.14.1 by @Totodore in #359
New Contributors
- @headironc made their first contribution in #349
- @yhx-12243 made their first contribution in #358
Full Changelog: v0.14.0...v0.14.1
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
v0.13.1
0.13.1
engineioxide
- fix: issue #319. Remove unnecessary panic when receiving unexpected websocket messages. This might happen with some specific socket.io clients.
What's Changed
- fix(engineio/ws): remove unecessary panic message when receiving unexpected ws packets by @Totodore in #320
Full Changelog: v0.13.0...v0.13.1
v0.13.0
Changelog
socketioxide
- fix: issue #311, the
delete_ns
fn was deadlocking the entire server when called from inside adisconnec_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 thanVec<u8>
to represent binary payloads. This allow to avoid unnecessary copies. - deps: use
futures-util
andfutures-core
rather than the wholefutures
crate.
engineioxide
- feat: the API use
Bytes/Str
rather thanVec<u8>
andString
to represent payloads. This allow to avoid unnecessary copies. - deps: use
futures-util
andfutures-core
rather than the wholefutures
crate.
What's Changed
- chore(deps-dev): bump vite from 5.0.12 to 5.0.13 in /examples/react-rooms-chat/client by @dependabot in #298
- chore(deps-dev): bump vite from 5.0.12 to 5.0.13 in /examples/loco-rooms-chat/client by @dependabot in #299
- tests: Improve test bed by @Totodore in #300
- chore(deps): update salvo requirement from 0.66.0 to 0.67.0 by @dependabot in #301
- docs: fix typo on test flag by @Totodore in #302
- Use bytes::Bytes instead of Vec to represent binary payloads by @kelnos in #285
- chore: remove salvo deps and corresponding doctest by @Totodore in #303
- chore(deps): bump hyper to "1.0.3" and remove unused features by @Totodore in #304
- chore(dev-deps): update rust_socketio requirement from 0.4.2 to 0.6.0 by @dependabot in #306
- chore(ci/bench): add bencher configuration by @Totodore in #307
- chore(deps): use
futures_core
andfutures_util
rather than wholefutures
crate by @Totodore in #305 - feat(engineio): add a
Str
type for Message packet by @Totodore in #310 - Fix: deadlocking when calling
close_ns
from inside adisconnect_handler
by @Totodore in #316
Full Changelog: v0.12.0...v0.13.0
v0.12.0
MSRV: Minimum supported Rust version is now 1.75.
Changelog
- (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 nowClone
. Be careful to drop clones when the socket is disconnected to avoid any memory leak.
What's Changed
- Implement Clone for SocketRef by @AkiraMiyakoda in #260
- Add middlewares/multiple fns to namespace by @Totodore in #280
- fix(engineio/socket): atomically adjacent packet requirement for binary payloads by @Totodore in #287
- chore(ci): trigger release manually by @Totodore in #288
Full Changelog: v0.11.1...v0.12.0
v0.11.1
v0.11.0
Changelog
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
andBroadcastOperators
in order to split logic and fn signatures between broadcast and non-broadcast operators.
engineioxide
- fix #277: with engine.io v3, the message byte prefix
0x4
was not added to the binary payload withws
transport. - bump dependency
base64
to 0.22.0.
What's Changed
- fix(socketio/client): connect timeout panic under heavy traffic by @Totodore in #252
- doc(example): add an axum tls example by @Totodore in #253
- doc(example): chat room example with loco as a backend by @kaplanelad in #254
- chore(conf): disable example by default by @Totodore in #256
- fix(ci): by @Totodore in #257
- fix(ci): by @Totodore in #259
- chore(deps-dev): bump vite from 5.0.7 to 5.0.12 in /examples/loco-rooms-chat/client by @dependabot in #255
- chore(deps): update loco-rs requirement from 0.2.3 to 0.3.1 by @dependabot in #263
- feat(socketio/socket): Return emitted data in case of emission error. by @Totodore in #262
- chore(deps): update salvo requirement from 0.65.0 to 0.66.0 by @dependabot in #266
- fix(engineio/ws): missing extra byte in websocket binary frame on EIO v3 by @kelnos in #278
- chore(deps): update base64 requirement from 0.21.0 to 0.22.0 by @dependabot in #279
- chore(ci): add a
heaptrack
job by @Totodore in #265 - chore(deps): bump to v0.11 by @Totodore in #281
New Contributors
- @kaplanelad made their first contribution in #254
- @kelnos made their first contribution in #278
Full Changelog: v0.10.2...v0.11.0
v0.10.2
socketioxide
- New
rooms
fn to get all the rooms of a namespace.
What's Changed
- fix(ci): release pipeline by @Totodore in #243
- doc(socketioxide) typo in extensions::len documentation by @zaregata in #244
- fix(ci): release by @Totodore in #245
- chore(deps-dev): bump vite from 5.0.7 to 5.0.12 in /examples/react-rooms-chat/client by @dependabot in #246
- feat(socketio/operators): get all rooms from
io
by @Totodore in #248 - fix(ci): Release by @Totodore in #250
Full Changelog: v0.10.1...v0.10.2