Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions api-outline.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,25 @@ dictionary RtcPacketSentInfo {
DOMHighResTimeStamp sendTime;
};

dictionary RtcPacketReceived {
enum RtcEcnMarking {
"classic",
"l4s",
"experienced-congestion",
};

[Exposed=Window,Worker]
interface RtcPacketReceived {
// TODO: BYOB, change to a CopyToBuffer function.
// TODO: L4S/ECN
ArrayBuffer data;
DOMHighResTimeStamp receiveTime;
readonly attribute ArrayBuffer data;
readonly attribute DOMHighResTimeStamp receiveTime;

// ECN marking observed when this packet was received. This is receive-only
// metadata and is not part of `data`; forwarding `data` does not copy the
// marking to the newly sent packet. This is null for packets with an ECN
// field of 00.
readonly attribute RtcEcnMarking? ecnMarking;

RtcNetworkRoute networkRoute;
readonly attribute RtcNetworkRoute networkRoute;
};

```
Expand Down
43 changes: 36 additions & 7 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -843,21 +843,50 @@ dictionary RtcPacketSentInfo {
: <dfn for="RtcPacketSentInfo" dict-member>sendTime</dfn>
:: The actual timestamp that the packet was put on the wire.

## RtcEcnMarking ## {#rtc-ecn-marking}
<pre class="idl">
enum RtcEcnMarking {
"classic",
"l4s",
"experienced-congestion"
};
</pre>
: <dfn for="RtcEcnMarking" enum-value>"classic"</dfn>
:: The ECN field is `10`, indicating the ECT(0) codepoint used by classic ECN senders.

: <dfn for="RtcEcnMarking" enum-value>"l4s"</dfn>
:: The ECN field is `01`, indicating the ECT(1) codepoint used by L4S-aware senders.

: <dfn for="RtcEcnMarking" enum-value>"experienced-congestion"</dfn>
:: The ECN field is `11`, indicating that the packet experienced congestion.

## RtcPacketReceived ## {#rtcpacketreceived}
<pre class="idl">
dictionary RtcPacketReceived {
ArrayBuffer data;
DOMHighResTimeStamp receiveTime;
RtcNetworkRoute networkRoute;
[Exposed=(Window,Worker)]
interface RtcPacketReceived {
readonly attribute ArrayBuffer data;
readonly attribute DOMHighResTimeStamp receiveTime;
readonly attribute RtcEcnMarking? ecnMarking;
readonly attribute RtcNetworkRoute networkRoute;
};
</pre>
: <dfn for="RtcPacketReceived" dict-member>data</dfn>
: <dfn for="RtcPacketReceived" attribute>data</dfn>
:: The byte buffer received.

: <dfn for="RtcPacketReceived" dict-member>receiveTime</dfn>
: <dfn for="RtcPacketReceived" attribute>receiveTime</dfn>
:: The timestamp of packet receipt.

: <dfn for="RtcPacketReceived" dict-member>networkRoute</dfn>
: <dfn for="RtcPacketReceived" attribute>ecnMarking</dfn>
:: The Explicit Congestion Notification (ECN) field of the IP packet as
received from the network, or `null` if the ECN field is `00`, indicating
a Not-ECN-Capable Transport packet.

This is receive-only metadata. It is not part of
{{RtcPacketReceived/data}}, and copying that data into an
{{RtcPacketToSend}} does not cause the received ECN marking to be applied
to the packet sent by {{RtcTransport/sendPackets()}}.

: <dfn for="RtcPacketReceived" attribute>networkRoute</dfn>
:: The route the packet arrived on.

## IceServer ## {#iceserver}
Expand Down
Loading