Releases: Totodore/socketioxide
Releases · Totodore/socketioxide
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
v0.5.1
- Fix a data race bug causing a protocol error when upgrading. A Noop engine.io packet was sent trough the websocket connection after an upgrade. Now all noop packets passing trough the websocket transport are filtered out.
- Fix a bug with binary packets with namespaces : namespace was put before the payload count whereas it should be put after according to the payload datagram.
What's Changed
- chore: prepare v0.5.0 by @Totodore in #83
- fix: README link in cargo by @Totodore in #85
- Chore: clippy fix + resolver v2 by @Totodore in #87
- Test: Add test suite for socket.io packet encoding by @Totodore in #91
- docs: fix typo on README.md by @Totodore in #92
- fix(engine.io): data race for the noop packet by @Totodore in #94
Full Changelog: v0.5.0...v0.5.1
v0.5.0
v0.5.0
socketioxide
- A
on_disconnect
function is now available on theSocket
instance. The provided callback will be called when the socket disconnects with the reasons for the disconnection. This is useful for logging or cleanup data. - A
connect_timeout
option is now available in the config options. It is the maximum time to wait for a socket.io handshake before closing the connection. The default is 45 seconds. - A
NsHandlers
struct was added. It describes namespace handlers passed to the SocketIoLayer/SocketIoService. Before, it was a type alias for a HashMap and it was containing types that were not supposed to be public.
engineioxide
- A
DisconnectReason
enum is passed to theon_disconnect
callback of the engine handler. - Bump
tokio-tungstenite
to 0.20.1.
What's Changed
- feat(socketioxide): disconnect handler by @Totodore in #41
- docs: update Readme.md by @Totodore in #78
- feat(socketio/ns): create a wrapper struct for NsHandlers and export it by @Totodore in #79
- chore(ci): add actions/cache by @Totodore in #81
- chore(ci): add release/test flag to key to separate caches by @Totodore in #82
- feat(socketio): connect timeout implementation by @Totodore in #80
Full Changelog: v0.4.1...v0.5.0
v0.4.1
New version v0.4.1 🚀:
This new release introduce :
- Better error handling thanks to @biryukovmaxim
- Engine.io v3 support thanks to @sleeyax and @biryukovmaxim
- Streaming payload parsing to handle heavy payloads without buffering
- Max payload limit applied on input payload
- Specific transport list in configuration for socket.io and engine.io
- New warp integration example
What's Changed
- chore: versioning by @Totodore in #20
- Create CODE_OF_CONDUCT.md by @Totodore in #23
- connection error handling: unsupported version, unsupported transport, bad handshake method by @biryukovmaxim in #21
- Add Warp usage example & split examples and e2e testing by @Totodore in #25
- Set content-type and charset by @biryukovmaxim in #26
- handling send to socket error by @biryukovmaxim in #31
- Revert "handling send to socket error" by @Totodore in #33
- Handle send error by @biryukovmaxim in #34
- Removing arc from handler property in
Engine
by @Totodore in #32 - Create dependabot.yml by @Totodore in #38
- Update itertools requirement from 0.10.5 to 0.11.0 in /socketioxide by @dependabot in #39
- Feature: Error Adapter by @Totodore in #40
- Set up code formatting by @Totodore in #43
- Feature: implement EngineIO V3 (closes #22) by @sleeyax in #24
- Fix failing EngineIO CI configuration by @sleeyax in #47
- Add missing await by @sleeyax in #48
- Fix invalid ping timeout in v3 protocol by @sleeyax in #50
- fix(engineioxide/engine)-avoid-one-socket-cloning by @Totodore in #57
- docs: add contributing guidelines by @Totodore in #58
- Ft improve payload parsing by @biryukovmaxim in #55
- Handle ordering bin packets by @biryukovmaxim in #35
- Feat: improve payload parsing by @Totodore in #53
- feat(engineioxide/v3) binary encoding payload by @Totodore in #61
- chore(ci): add engineio ci for v4 and ci for v3 & v4 by @Totodore in #56
- chore(deps): Update tokio-tungstenite requirement from 0.19.0 to 0.20.0 in /engineioxide by @dependabot in #59
- feat(engineioxide): specific transport restrictions (fix issue #49) by @Totodore in #70
- Create FUNDING.yml by @Totodore in #72
- chore(versioning): v0.4.0 by @Totodore in #73
New Contributors
Full Changelog: v0.3.0...v0.4.1
v0.3.0
What's Changed
- Hotfix: documentation link by @Totodore in #11
- Socket Extensions + various fixs + docs by @Totodore in #13
- change sid generator, use sid type alias by @biryukovmaxim in #19
- Examples + Refactoring by @Totodore in #17
New Contributors
- @biryukovmaxim made their first contribution in #19
Full Changelog: v0.2.0...v0.3.0