- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想检查一下我对 WebRTC 数据 channel 的理解是否正确,特别是可以通过改变 ordered
来实现的不同类型的 channel 。 & maxRetransmits
或 maxPacketLifeTime
RTCDataChannelInit
的属性字典。我的以下假设是否正确:
RTCPeerConnection.createDataChannel("label", {
ordered: true
});
maxRetransmits
或 maxPacketLifeTime
以实现可靠性?)RTCPeerConnection.createDataChannel("label", {
ordered: false
});
RTCPeerConnection.createDataChannel("label", {
ordered: false,
maxRetransmits: 0
});
RTCPeerConnection.createDataChannel("label", {
ordered: true,
maxRetransmits: 0
});
最佳答案
你所有的假设都是正确的。
对于第一种和第二种情况,不设置 maxRetransmits
和 maxPacketLifeTime
结果为 可靠 channel 根据section 6.2 RTCDataChannel of WebRTC W3C Recommendation ,如下(粗体和斜体是我的):
An
RTCDataChannel
can be configured to operate in different reliability modes. A reliable channel ensures that the data is delivered at the other peer through retransmissions. An unreliable channel is configured to either limit the number of retransmissions (maxRetransmits
) or set a time during which transmissions (including retransmissions) are allowed (maxPacketLifeTime
). These properties can not be used simultaneously and an attempt to do so will result in an error. Not setting any of these properties results in a reliable channel.
ordered: false
和
maxRetransmits: 0
, 创建一个
不可靠和
无序根据
RFC8831 section 6.1 的 UDP 等 channel ,如下(粗体和斜体是我的):
- The partial reliability extension defined in [RFC3758] MUST besupported. In addition to the timed reliability PR-SCTP policydefined in [RFC3758], the limited retransmission policy defined in[RFC7496] MUST be supported. Limiting the number ofretransmissions to zero, combined with unordered delivery,provides a UDP-like service where each user message is sentexactly once and delivered in the order received.
ordered: true
和
maxRetransmits: 0
, 创建一个
不可靠但是
订购 (
“已排序” ) channel 。根据
RFC3758 section 1.3的一段话存在这种类型的 channel ,如下(粗体和斜体是我的):
- In addition to providing unordered, unreliable data transfer as UDP does, PR-SCTP can provide ordered, unreliable data transfer service.
Note that after receiving a FORWARD TSN and updating the cumulativeacknowledgement point, if a TSN that was skipped does arrive (i.e.,due to network reordering), then the receiver will follow the normalrules defined in RFC 2960 [2] for handling duplicate data. Thisimplies that the receiver will drop the chunk and report it as aduplicate in the next outbound SACK chunk.
关于WebRTC 信道可靠性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54292824/
我想知道我的问题是否可行。那么每个 channel 都有一个特定的频率 1 à 13(2,4GHz)、36 到 64(5GHz) 和 100 到 165(5GHz)。例如 : channel 号 1:
我是一名优秀的程序员,十分优秀!