Networking · function

unreliableChannel

A channel configured the way a simulation wants one.

Explained in Networking and rollback.

function unreliableChannel(connection: PeerConnectionLike, label?: string): DataChannelLike
import { unreliableChannel } from '@driftengine/network';

Parameters

ParameterTypeDescription
connectionPeerConnectionLike
label?string

In depth

maxRetransmits: 0 and ordered: false together, and both matter. Unordered alone still retransmits, so a drop still costs a round trip before the data arrives — late, for a tick that has gone. Zero retransmissions alone still delivers in order, so a lost frame still blocks the ones behind it. Either on its own reads like the fix and is half of it.