MDN self-hosted library · e01.org

WebTransportSendStream: getStats() method

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
const stats = await stream.getStats();
const bytesNotReceived = stats.bytesSent - stats.bytesAcknowledged;
console.log(`Bytes sent but not acknowledged: ${bytesNotReceived}`);