spoofManager.onUpdate

onUpdate(f): void

Register the callback for updates. This is called whenever a packet is delayed.

You can use this to release packets after a certain amount of time.

Parameters

f

(packets) => void

Returns

void

Example

spoofManager.onUpdate(packets => {
    for (let packet of packets) {
        if (packet.hasAged(1000)) { // Release after 1 second
            spoofManager.release(packet);
        }
    }
});

Last updated