Engineioxide does the heavy lifting for socketioxide, a socket.io server implementation in Rust which integrates with the tower stack.
You can still use engineioxide as a standalone crate to talk with an engine.io client.
Supported Protocols
You can enable support for other engine.io protocol implementations through feature flags. The latest protocol version (v4) is enabled by default.
To add support for the v3 protocol version, adjust your dependency configuration accordingly:
[]
# Enables the `v3` protocol (`v4` is always enabled, as it's the default).
= { = "0.3.0", = ["v3"] }
Feature flags :
v3: Enable the engine.io v3 protocoltracing: Enable tracing logs with thetracingcrate
Basic example with axum :
use EngineIoLayer;
use EngineIoHandler;
use ;
use ;
use ;
use get;
// Global state, with axum it must be clonable
// Socket state
// Create a new engineio layer
let layer = new;
let app = new
.route
.layer;
// Spawn the axum server