Guides

Comparison

Parity with socket.io-client 4.8, what is not implemented, and other Rust clients.

Parity with socket.io-client 4.8

Ported and tested: the socket.io-parser and engine.io-parser vectors, the connection and socket cases of socket.io-client and engine.io-client against Node servers, plus differential runs where the Node client and this client play the same scenario against one recording server (crates/socketio-next/tests/conformance.rs).

Not implemented

On purpose:

  • one Manager multiplexing several namespaces over one connection (each Client has its own; connect several);
  • volatile (offline emits already fail fast);
  • retries / ackTimeout queues, onAnyOutgoing, forceBase64;
  • WebTransport, WASM, Engine.IO v3 (socket.io 2.x servers), permessage-deflate;
  • the msgpack parser (a feature later if a server needs it);
  • derive macros for events;
  • concurrent handler dispatch (handlers run in order);
  • injecting your own reqwest or tungstenite client (it would tie the public API to their versions);
  • browser-only options.

connect() returns the first attempt's error instead of retrying silently.

Other Rust clients

rust_socketio 0.6 is where this crate started (see the migration). tf-rust-socketio (a fork of it) and sioc / eioc are other clients. Per-attempt query and headers, cookies, proxy support, the OS verifier, close codes, HTTP error bodies and reconnect() after close were added after comparing with them and with the upstream branch.

What this crate has on top: socket.io-client 4.8 behaviour checked against the reference client on the wire, typed states and errors, binary anywhere in the arguments, connection state recovery, and a Tauri plugin.