A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://developer.mozilla.org/en-US/docs/Web/API/WebTransportSendStream/sendOrder below:

WebTransportSendStream: sendOrder property - Web APIs

WebTransportSendStream: sendOrder property

Limited availability

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

Note: This feature is available in Web Workers.

The sendOrder property of the WebTransportSendStream interface indicates the send priority of this stream relative to other streams for which the value has been set.

Queued bytes are sent first for streams that have a higher value. If not set, the send order depends on the implementation.

Value

A number indicating the relative priority of this stream when sending bytes.

Examples

The example below shows how you can set the initial sendOrder when calling WebTransport.createUnidirectionalStream() to create the send stream, read the value from the stream, and then change the order. After changing the order the priority of this stream would increase, becoming higher than any stream with a priority of less than "596996858".

async function writeData() {
  const stream = await transport.createUnidirectionalStream({
    sendOrder: "400", // Set initial stream order
  });

  console.log(`Stream order: ${stream.sendOrder}`); // Stream order: 400

  // write data ...

  // Change the stream order
  stream.sendOrder = 596996858;
  console.log(`Stream order: ${stream.sendOrder}`); // Stream order: 596996858

  // write more data ...
}
Specifications Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4