Skip to content

Releases: Totodore/socketioxide

v0.10.1

19 Jan 12:01
92f675f
Compare
Choose a tag to compare

Socketioxide

  • New as_str fn for Sid.
  • 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 for Sid 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

02 Jan 11:31
6032ffb
Compare
Choose a tag to compare

socketioxide

  • Rework for emit_with_ack fns. It now returns an AckStream that can be used either as a future when expecting one ack or as a stream when expecting multiple acks. When expecting multiple acks the AckStream will yield AckResults as well as their corresponding socket id.

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 for salvo_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

21 Dec 20:07
Compare
Choose a tag to compare

Changelog

  • Add SocketIo::get_socket and Operators::get_socket methods to get a socket ref from its id.
  • Switch to pin-project-lite instead of pin-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

Full Changelog: v0.9.0...v0.9.1

v0.9.0

15 Dec 21:56
Compare
Choose a tag to compare

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

v0.8.0

11 Dec 17:25
Compare
Choose a tag to compare

socketioxide

  • Add transport_type and protocol fn on the Socket struct. It allows to know the transport type and the protocol used by the socket.
  • Dynamic DisconnectHandler. Now the on_disconnect handler take a dynamic handler that maybe async and contain any type that implements FromDisconnectParts. 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

New Contributors

Full Changelog: v0.7.3...v0.8.0

v0.7.3

05 Dec 21:19
Compare
Choose a tag to compare

Changelog

  • Fix #189. Async message handlers were never called because the returned future was not spawned with tokio::spawn.

Full Changelog: v0.7.2...v0.7.3

v0.7.2

22 Nov 17:52
c0e2b22
Compare
Choose a tag to compare

Changelog

  • The on_disconnect callback now takes a SocketRef rather than an Arc<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

Full Changelog: v0.7.1...v0.7.2

v0.7.1

12 Nov 20:10
596442e
Compare
Choose a tag to compare

Changelog

socketioxide

  • Fix #154, build was broken when using the hyper-v1 feature flag because of hyper-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 for hyper v1 by @Totodore in #155

Full Changelog: v0.7.0...v0.7.1

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