Releases: Totodore/socketioxide
Releases · Totodore/socketioxide
v0.10.1
Socketioxide
- New
as_str
fn forSid
. - Http request is now cloned for the websocket transport (it was not possible before http v1). Therefore it is possible to get headers/extensions of the initial request.
What's Changed
- fix(clippy): errors by @Totodore in #223
- feat(engineio/sid): add
as_str
fn forSid
by @Totodore in #224 - feat(engineio/ws): Clone http request for ws transport by @Totodore in #227
- chore(deps): update salvo requirement from 0.63.0 to 0.64.0 by @dependabot in #228
- chore(deps): viz 0.8.0 by @fundon in #230
- chore(deps): update salvo requirement from 0.64.0 to 0.65.0 by @dependabot in #235
- docs(socketio): correct links in the socket.io doc homepage by @zaregata in #238
- chore(ci): add release pipeline by @Totodore in #239
- docs(socketio): Document emit variable arguments fn by @Totodore in #240
Full Changelog: v0.10.0...v0.10.1
v0.10.0
socketioxide
- Rework for
emit_with_ack
fns. It now returns anAckStream
that can be used either as a future when expecting one ack or as a stream when expecting multiple acks. When expecting multiple acks theAckStream
will yieldAckResult
s as well as their corresponding socketid
.
What's Changed
- fix: compile viz-echo by @fundon in #218
- test(socketio): improve testing by directly using the
rust_socketio
client by @Totodore in #219 - doc(example): add
cors
forsalvo_echo
by @Totodore in #221 - feat: Better ergonomy for ack responses with custom AckStream struct by @Totodore in #201
Full Changelog: v0.9.1...v0.10.0
v0.9.1
Changelog
- Add
SocketIo::get_socket
andOperators::get_socket
methods to get a socket ref from its id. - Switch to
pin-project-lite
instead ofpin-project
.
What's Changed
- doc(socketio/extract): add missing extractors to the list by @Totodore in #199
- chore(deps): switch to
pin-project-lite
for Pin Projection by @Totodore in #200 - doc: Fix version compatibility (Axum - Hyper - Socketioxide) by @tausifcreates in #202
- fix(git): Cargo.lock should be ignored by @fundon in #204
- doc: add a PR template and update contrib doc by @Totodore in #208
- refactor: service implementation by @fundon in #205
- doc: Fix wrong links to axum in README.md by @AkiraMiyakoda in #209
- examples: add viz-echo example by @fundon in #203
- doc: add tokio discordl ink by @Totodore in #210
- examples: Add Room based chat example, built with React and Socketioxide. by @tausifcreates in #211
- feat: get a socket by the specified sid by @fundon in #216
New Contributors
- @fundon made their first contribution in #204
- @AkiraMiyakoda made their first contribution in #209
Full Changelog: v0.9.0...v0.9.1
v0.9.0
0.9.0
- Bump
hyper
to 1.0.1. It is now possible to use frameworks based on hyper v1.*. Check the compatibility table for more details. - Bump
http
to 1.0 - Bump
http-body
to 1.0 - Bump
tokio-tungstenite
to 0.21.0
What's Changed
- Migration to hyper 1.0 by @Totodore in #196
Full Changelog: v0.8.0...v0.9.0
v0.8.0
socketioxide
- Add
transport_type
andprotocol
fn on theSocket
struct. It allows to know the transport type and the protocol used by the socket. - Dynamic
DisconnectHandler
. Now theon_disconnect
handler take a dynamic handler that maybe async and contain any type that implementsFromDisconnectParts
. It allows to extract data from the disconnection, like the socket, the reason of the disconnection, the state etc. - New
state
feature flag. It enables global state management. It is useful to share data between handlers. It is disabled by default.
engineioxide
- Packet encoding/decoding optimizations.
What's Changed
- fix(clippy): fix clippy lints by @Totodore in #174
- chore(deps): bump salvo from 0.58.3 to 0.58.5 by @dependabot in #176
- Optimize
engineio
packets processing by @Totodore in #162 - Improve adapter configuration by @Totodore in #179
- Transport type and Protocol Version info for
Socket
by @Totodore in #180 - doc(socketio): fix
tower
links by @Totodore in #181 - meta: add discussions q&a link by @Totodore in #183
- fix: use right example link by @caojen in #185
- Disconnect dynamic handlers by @Totodore in #188
- chore(deps): bump tokio from 1.34.0 to 1.35.0 by @dependabot in #193
- chore(deps): bump itoa from 1.0.9 to 1.0.10 by @dependabot in #192
- feat(socketio/state): global state implementation backed by a
state::TypeMap
by @Totodore in #194
New Contributors
Full Changelog: v0.7.3...v0.8.0
v0.7.3
v0.7.2
Changelog
- The
on_disconnect
callback now takes aSocketRef
rather than anArc<Socket>
to match other handlers. It also avoids that the user clone the socket and create a memory leak. - Documentation improvements (see https://docs.rs/socketioxide).
- Bump library dependencies (see below).
What's Changed
- fix: CHANGELOG version error by @Totodore in #156
- chore(deps): bump http from 0.2.9 to 0.2.10 by @dependabot in #160
- chore(deps): remove unused
async_trait
deps by @Totodore in #159 - socket.io packet encoding with itoa by @Totodore in #161
- chore(deps): bump http from 0.2.10 to 0.2.11 by @dependabot in #165
- chore(deps): bump tracing-subscriber from 0.3.17 to 0.3.18 by @dependabot in #164
- chore(deps): bump uuid from 1.5.0 to 1.6.0 by @dependabot in #168
- chore(deps): bump serde from 1.0.192 to 1.0.193 by @dependabot in #170
- chore(deps): bump uuid from 1.6.0 to 1.6.1 by @dependabot in #169
- fix(socketio): Make the
on_disconnect
callback take aSocketRef
by @Totodore in #171 - Improve doc.rs documentation by @Totodore in #166
- chore(deps): bump to v0.7.2 by @Totodore in #173
Full Changelog: v0.7.1...v0.7.2
v0.7.1
Changelog
socketioxide
- Fix #154, build was broken when using the
hyper-v1
feature flag because ofhyper-util
dependency which is not published on crates.io.
What's Changed
- chore(deps): specify version 0 for hyper util by @Totodore in #153
- fix: implement manually
tokio_io
module forhyper v1
by @Totodore in #155
Full Changelog: v0.7.0...v0.7.1
v0.7.0
Changelog
socketioxide
- The
extensions
field on sockets has been moved to a separate optional feature flag namedextensions
- All the
tracing
internal calls have been moved to a separate optional feature flag namedtracing
- A compatibility layer is now available for hyper v1 under the feature flag
hyper-v1
. You can callwith_hyper_v1
on theSocketIoLayer
or theSocketIoService
to get a layer/service working with hyper v1. Therefore, it is now possible to usesalvo
as an http server. The default is still hyper v0. - Socket.io packet encoding/decoding has been optimized, it is now between ~15% and ~50% faster than before.
- The v5 feature flag is removed, it is now enabled by default. It is made to avoid destructive feature flags, and to be sure that
--no-default-features
will always work without enabling anything else. - All the handlers now have dynamic parameters. It is now possible to use any type that implements
FromMessageParts
orFromMessage
as a parameter for a message handler andFromConnectPart
for a connect handler. This is useful to extract data from the event, like the socket, the data, an acknowledgment, etc. - All the handlers are now optionally async.
- The request data to initialize the socket.io connection is available with
Socket::req_parts()
. - MSRV is now 1.67.0
- Bump tokio from 1.33.0 to 1.34.0
- Bump serde from 1.0.190 to 1.0.192
- Bump serde_json from 1.0.107 to 1.0.108
engineioxide
- All the
tracing
internal calls have been moved to a separate optional feature flag namedtracing
- A compatibility layer is now available for hyper v1 under the feature flag
hyper-v1
. You can callwith_hyper_v1
on theEngineIoLayer
or theEngineIoService
to get a layer/service working with hyper v1. The default is still hyper v0. - Sid generation is now done manually without external crates
- The v4 feature flag is removed, it is now enabled by default. It is made to avoid destructive feature flags, and to be sure that
--no-default-features
will always work without enabling anything else. - Fix an upgrade synchronization bug when using the websocket transport which was leading the client to wait for a ping packet (30s by default) before upgrading to websocket.
- The
on_connect
handler was called twice when upgrading to websocket. It is now called only once.
What's Changed
- chore(versioning): v0.6.0 by @Totodore in #115
- chore(deps): bump rustix from 0.38.18 to 0.38.19 by @dependabot in #116
- feat(engineio/sid): custom sid generation with 128 bit array by @Totodore in #122
- fix: CI was tested only with v3 protocol by @Totodore in #127
- feat(socketio/ns): improve connect process by @Totodore in #129
- chore(deps): optimize dependencies by @Totodore in #125
- bench(socketio): add packet encode/decode benchmarks by @Totodore in #130
- feat(socketio/ns): store ns path and rooms as
Cow<'static, str>
by @Totodore in #124 - Chore(deps): hyper 1.0 by @Totodore in #126
- docs: Update README.md by @Totodore in #131
- fix(engineio/packet): array expand for packet event only when not empty by @Totodore in #134
- fix(engineio/engine): the connect handle was called multiple times by @Totodore in #135
- fix(engineio/transport): Noop packet was sent at the wrong moment by @Totodore in #136
- fix(socketio/adapter): broadcast except current sid when no rooms by @Totodore in #138
- docs: improve examples and copy official socket.io impl examples by @Totodore in #133
- feat(socketio): default
LocalAdapter
as generic param by @Totodore in #139 - feat(socketio/handler): connect handlers with dynamic params by @Totodore in #140
- refactor: remove default v3/v4 flag to avoid destructive features by @Totodore in #142
- doc: Update issue templates and improve CI by @Totodore in #141
- chore(ci): remove test coverage by @Totodore in #147
- chore(deps): bump serde from 1.0.190 to 1.0.192 by @dependabot in #146
- chore(deps): bump serde_json from 1.0.107 to 1.0.108 by @dependabot in #145
- chore(deps): bump hyper-util from
ced9f81
to11776bd
by @dependabot in #144 - chore(deps): bump tokio from 1.33.0 to 1.34.0 by @dependabot in #148
- Fix: broadcast by default for any
io
operator by @Totodore in #150 - feat(engineio/socket): make init http request available everywhere by @Totodore in #151
Full Changelog: v0.6.0...v0.7.0
v0.6.0
Contributions
Thanks to @sleeyax for the support of the socket.io v4 protocol.
Thanks to @tausifcreates for minor fixes.
socketioxide
- New API for creating the socket.io layer/service. A cheaply clonable
SocketIo
struct is now returned with the layer/service and allows to access namespaces/rooms/sockets everywhere in the application. Moreover, it is now possible to add and remove namespaces dynamically through theSocketIo
struct. - The socket.io
v4
protocol is now available under the feature flagv4
, it matches every socket.io js version from 1.0.3 to current . Thev5
protocol is still the default and is more performant, it matches every socket.io js version from v3.0.0 to current.
engineioxide
- The socket parameter for the handler is now an
Arc<Socket>
. - The
max_payload
option is now applied when encoding a packet. Before, it was only applied when decoding a packet. - With
websocket
transport, packets are now bufferred before being flushed. Before, they were flushed one by one.
What's Changed
- chore(deps): Release 0.5.1 by @Totodore in #95
- refactor: Minor optimization and fixes by @tausifcreates in #96
- fix: move
tx_map_fn
&close_fn
declaration to Engine impl by @tausifcreates in #98 - docs: add changelog for v0.5.1 by @Totodore in #100
- feat: cheaply clonable io struct by @Totodore in #93
- fix(clippy): issue #104 by @Totodore in #105
- chore(ci): migrating from official e2e to custom by @Totodore in #109
- refactor(engineio/engine): transport module by @Totodore in #106
- feat(socketioxide/v4): implement SocketIO V4 (closes #51) by @sleeyax in #52
- docs(readme.md): fix badges by @Totodore in #110
- Update README.md by @Totodore in #111
- Update README.md by @Totodore in #112
- fix: apply max payload option when encoding (fix #113) by @Totodore in #114
New Contributors
- @tausifcreates made their first contribution in #96
Full Changelog: v0.5.1...v0.6.0