LoopbackOptions beta
Interface of @v12-engine/engine
ts
export interface LoopbackOptionsA connection inside the page, standing in for a network (loopback)
Members
jitter
ts
jitter?: number;Milliseconds a message may take on top of that, at random: never out of order, the way a WebSocket keeps it
latency
ts
latency?: number;Milliseconds each message takes, one way
loss
ts
loss?: number;The share of the snapshots that never arrive, 0..1, for what a lossy connection does to the screen. Only from the host: the welcome and the player's commands always do. The events of a snapshot lost are lost with it
random
ts
random?: () => number;Random numbers for jitter and loss: Math.random when left out (the simulation does not use it)