Skip to content

refactor(engineio): move shareable constructs with future client to core#555

Draft
Totodore wants to merge 21 commits into
mainfrom
engineioxide-client
Draft

refactor(engineio): move shareable constructs with future client to core#555
Totodore wants to merge 21 commits into
mainfrom
engineioxide-client

Conversation

@Totodore

@Totodore Totodore commented Aug 3, 2025

Copy link
Copy Markdown
Owner

First step to build an engineio client with the same core. The future engineio client will need the following constructs:

  • Packets structs/parsing
  • Polling payloads encoder/decoder. In order to do that the encoder is now taking a generic stream rather than a mpsc channel because core must not depend on tokio.
  • Protocol Version / Transport Types

TODO: check we dont loose packets with the current Peekable impl.

@Totodore Totodore added A-engineioxide Area related to engineioxide A-core Area related to socketioxide-core P-Low Low priority C-Feature-request Request for a feature labels Aug 3, 2025
@Totodore Totodore changed the title feat(engineio-client): wip Stream + Sink based client implementation feat(engineio-client): wip Stream + Sink based client implementation Aug 3, 2025
Comment thread crates/engineioxide-client/src/client.rs Fixed
Comment thread crates/engineioxide-client/src/client.rs Fixed
Comment thread crates/engineioxide-client/src/transport/polling.rs Fixed
Comment thread crates/engineioxide-client/src/transport/polling.rs Fixed
Comment thread crates/engineioxide-client/src/transport/polling.rs Fixed
Comment thread crates/engineioxide-client/src/transport/polling.rs Fixed
Comment thread crates/engineioxide-client/tests/handshake.rs Fixed
Comment thread crates/engineioxide-client/tests/handshake.rs Fixed
Comment thread crates/engineioxide-client/tests/handshake.rs Fixed
Comment thread crates/engineioxide-client/tests/handshake.rs Fixed
Comment thread crates/engineioxide-core/src/packet.rs Fixed
Comment thread crates/engineioxide-core/src/packet.rs Fixed
Comment thread crates/engineioxide-core/src/packet.rs Fixed
@Totodore Totodore force-pushed the engineioxide-client branch from 096e8ed to d111347 Compare August 9, 2025 18:37
Comment thread crates/engineioxide/src/transport/ws.rs Fixed
Comment thread crates/engineioxide/src/transport/ws.rs Fixed
Comment thread crates/engineioxide/src/transport/ws.rs Fixed
Comment thread crates/engineioxide/src/transport/ws.rs Fixed
Comment thread crates/engineioxide/src/transport/ws.rs Fixed
Comment thread crates/engineioxide/src/transport/ws.rs Fixed
Comment thread crates/engineioxide/src/transport/ws.rs Fixed
Comment thread crates/engineioxide/src/transport/ws.rs Fixed
Comment thread crates/engineioxide/src/transport/ws.rs Fixed
Comment thread crates/engineioxide/src/transport/ws.rs Fixed
Comment thread crates/engineioxide/src/transport/ws.rs Fixed
@codspeed-hq

codspeed-hq Bot commented Jun 29, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 87 untouched benchmarks


Comparing engineioxide-client (c6a4123) with main (6f0774a)

Open in CodSpeed

@Totodore Totodore force-pushed the engineioxide-client branch from 4bff1f2 to 3de1ec1 Compare June 29, 2026 20:00
Comment thread crates/engineioxide/src/transport/mod.rs Fixed
Comment thread crates/engineioxide/src/transport/mod.rs Fixed
Comment thread crates/engineioxide/src/transport/mod.rs Fixed
@Totodore Totodore force-pushed the engineioxide-client branch from 3de1ec1 to 47ad1b6 Compare June 29, 2026 20:08
Comment thread crates/engineioxide-client/src/client.rs Fixed
Comment thread crates/engineioxide-client/src/client.rs Fixed
Comment thread crates/engineioxide-client/src/client.rs Fixed
Comment thread crates/engineioxide-client/src/client.rs Fixed
Comment thread crates/engineioxide-client/src/client.rs Fixed
Comment thread crates/engineioxide-client/src/transport/polling.rs Fixed
Comment thread crates/engineioxide-client/src/transport/polling.rs Fixed
Comment thread crates/engineioxide-client/tests/handshake.rs Fixed
Comment thread crates/engineioxide-client/tests/handshake.rs Fixed
Comment thread crates/engineioxide-client/tests/handshake.rs Fixed
@Totodore Totodore force-pushed the engineioxide-client branch from 7a8712d to a93e14d Compare June 29, 2026 20:45
@Totodore Totodore force-pushed the engineioxide-client branch from a93e14d to f41d1c3 Compare June 29, 2026 20:45
@Totodore Totodore changed the title feat(engineio-client): wip Stream + Sink based client implementation refactor(engineio): move shareable constructs with future client to core Jun 29, 2026
) -> Result<PacketBuf, Error> {
let packet = rx.recv().await.ok_or(Error::Aborted)?;
async fn recv_packet(mut rx: Pin<&mut Peekable<impl Stream<Item = PacketBuf>>>) -> PacketBuf {
let packet = rx.next().await.unwrap_or(smallvec![]);

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: check implication from raising err to returning default.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: check for yield_packets usage in the decoder

@Totodore Totodore added C-Refactoring Implies a refactoring and removed C-Feature-request Request for a feature labels Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-core Area related to socketioxide-core A-engineioxide Area related to engineioxide C-Refactoring Implies a refactoring P-Low Low priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants