Same 5% loss.
One of these is lagless.

WebRTC data channels for io games, with a Rust core and a Node.js API. Ping stays near the real round trip when the connection drops packets.

classic SCTP
12.6 s
lagless
214 ms

Ping p50 at 200 ms RTT and 5% loss, server to client (client to server is the browser's own SCTP). Full setup

pnpm add lagless

True send queue

Stack queue, in-flight bytes, cwnd, srtt and min RTT come straight from the SCTP association. No hidden buffer.

Drop on backpressure

Unreliable send() returns false when it wasn't queued. Keep the state owed and send fresher state next tick.

RACK-TLP

RFC 8985 loss recovery patched into rtc-sctp, so a lost packet doesn't wait for a 1 s retransmission timeout.

Per-peer pacer

A delay-based budget keeps the network queue near zero. Reliable goes first, unreliable fills the rest.

Honest pings

Probe messages skip the drop gate, so ping measures the real queue instead of hiding it.

Rust core, Node API

A napi-rs binding over the webrtc-rs rtc sans-IO core, with a typed TypeScript API on top.

Send fresh, never stale

send() tells you when unreliable state wasn't queued. Keep it owed, and next tick send the newest version instead of piling up old snapshots behind a lost packet.

API reference →
// every tick, per player
server.send(peer, "reliable", events);
for (const snap of snapshots) {
  if (!server.send(peer, "state", snap)) break;
  // dropped: send fresher state next tick
}