Skip to content

Releases: Totodore/socketioxide

v0.7.0

12 Nov 17:44
Compare
Choose a tag to compare

Changelog

socketioxide

  • The extensions field on sockets has been moved to a separate optional feature flag named extensions
  • All the tracing internal calls have been moved to a separate optional feature flag named tracing
  • A compatibility layer is now available for hyper v1 under the feature flag hyper-v1. You can call with_hyper_v1 on the SocketIoLayer or the SocketIoService to get a layer/service working with hyper v1. Therefore, it is now possible to use salvo 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 or FromMessage as a parameter for a message handler and FromConnectPart 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 named tracing
  • A compatibility layer is now available for hyper v1 under the feature flag hyper-v1. You can call with_hyper_v1 on the EngineIoLayer or the EngineIoService 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 to 11776bd 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

18 Oct 16:26
Compare
Choose a tag to compare

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 the SocketIo struct.
  • The socket.io v4 protocol is now available under the feature flag v4, it matches every socket.io js version from 1.0.3 to current . The v5 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

New Contributors

Full Changelog: v0.5.1...v0.6.0

v0.5.1

12 Oct 02:06
Compare
Choose a tag to compare
  • 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

Full Changelog: v0.5.0...v0.5.1

v0.5.0

27 Sep 09:05
Compare
Choose a tag to compare

v0.5.0

socketioxide

  • A on_disconnect function is now available on the Socket 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 the on_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

20 Aug 09:49
Compare
Choose a tag to compare

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

New Contributors

Full Changelog: v0.3.0...v0.4.1

v0.3.0

17 Jun 14:58
84eda00
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.2.0...v0.3.0