12.、 Data Handling【数据处理】

原文链接:https://datatracker.ietf.org/doc/html/rfc8445#section-12

12.、 Data Handling【数据处理】

12.1. Sending Data【发送数据】

An ICE agent MAY send data on any valid pair before selected pairs have been produced for the data stream.
在为数据流生成选定对之前,ICE 代理可以在任何有效对上发送数据。

Once selected pairs have been produced for a data stream, an agent MUST send data on those pairs only.An agent sends data from the base of the local candidate to the remote candidate.
一旦为数据流生成了选定的对,代理必须仅在这些对上发送数据。代理将数据从本地候选者的基础发送到远程候选者。

In the case of a local relayed candidate, data is forwarded through the base (located in the TURN server), using the procedures defined in [RFC5766].
在本地relayed候选的情况下,使用[RFC5766]中定义的程序通过base(位于TURN服务器中)转发数据。

If the local candidate is a relayed candidate, it is RECOMMENDED that an agent creates a channel on the TURN server towards the remote candidate.
如果本地候选是relayed,建议代理在 TURN 服务器上创建一个通向远端候选的通道。

This is done using the procedures for channel creation as defined in Section 11 of [RFC5766].
这是使用 [RFC5766 的第 11 节] 中定义的通道创建过程完成的。

The selected pair for a component of a data stream is:
数据流组件的选定对是:

  • empty if the state of the checklist for that data stream is Running, and there is no previous selected pair for that component due to an ICE restart
    如果该数据流的核对表状态为 Running,并且由于 ICE 重启而没有先前为该组件选择的对,则为空
  • equal to the previous selected pair for a component of a data stream if the state of the checklist for that data stream is Running, and there was a previous selected pair for that component due to an ICE restart
    如果该数据流的检查表状态为正在运行,则等于该数据流的组件的先前选择的对,并且由于 ICE 重新启动而存在该组件的先前选择的对

Unless an agent is able to produce a selected pair for each component associated with a data stream, the agent MUST NOT continue sending data for any component associated with that data stream.
除非代理能够为与数据流关联的每个组件生成选定的对,否则代理不得继续为与该数据流关联的任何组件发送数据。

12.1.1. Procedures for Lite Implementations【精简实现的过程】

A lite implementation MUST NOT send data until it has a valid list that contains a candidate pair for each component of that data stream.
一个 lite 实现必须不发送数据,直到它有一个有效列表,其中包含该数据流的每个组件的候选对

Once that happens, the ICE agent MAY begin sending data packets.
一旦发生这种情况,ICE 代理可以开始发送数据包。

To do that, it sends data to the remote candidate in the pair (setting the destination address and port of the packet equal to that remote candidate) and will send it from the base associated with the candidate pair used for sending data.
为此,它将数据发送到该对中的远端候选(将数据包的目标地址和端口设置为等于该远端候选),并将从与用于发送数据的候选对关联的基址发送数据。

In case of a relayed candidate, data is sent from the agent and forwarded through the base (located in the TURN server), using the procedures defined in [RFC5766].
在relayed候选人的情况下,使用 [RFC5766] 中定义的程序,数据从代理发送并通过base(位于 TURN 服务器中)转发。

12.2. Receiving Data【接收数据】

Even though ICE agents are only allowed to send data using valid candidate pairs (and, once selected pairs have been produced, only on the selected pairs), ICE implementations SHOULD by default be prepared to receive data on any of the candidates provided in the most recent candidate exchange with the peer.
即使 ICE 代理只允许使用有效的候选对发送数据(并且,一旦产生了选定的对,仅在选定的对上),ICE 实现默认情况下应该准备好接收关于大多数提供的任何候选的最近数据与对等方的候选交流。

ICE usages MAY define rules that differ from this, e.g., by defining that data will not be sent until selected pairs have been produced for a data stream.
ICE 使用可以定义与此不同的规则,例如,通过定义在为数据流生成选定对之前不会发送数据。

When an agent receives an RTP packet with a new source or destination IP address for a particular RTP/RTCP data stream, it is RECOMMENDED that the agent readjust its jitter buffers.
当代理接收到具有特定 RTP/RTCP 数据流的新源或目标 IP 地址的 RTP 数据包时,建议代理重新调整其抖动缓冲区。

Section 8.2 of RFC 3550 [RFC3550] describes an algorithm for detecting synchronization source (SSRC) collisions and loops.
[RFC 3550 的第 8.2 节] 描述了一种用于检测同步源 (SSRC) 冲突和循环的算法。

These algorithms are based, in part, on seeing different source transport addresses with the same SSRC.
这些算法部分基于查看具有相同 SSRC 的不同源传输地址。

However, when ICE is used, such changes will sometimes occur as the data streams switch between candidates.
但是,当使用 ICE 时,有时会随着数据流在候选之间切换而发生这种变化。

An agent will be able to determine that a data stream is from the same peer as a consequence of the STUN exchange that proceeds media data transmission.
作为进行媒体数据传输的 STUN 交换的结果,代理将能够确定数据流来自同一对等方。

Thus, if there is a change in the source transport address, but the media data packets come from the same peer agent, this MUST NOT be treated as an SSRC collision.
因此,如果源传输地址发生变化,但媒体数据包来自同一个对等代理,则不得将其视为 SSRC 冲突。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值