0

假设 A 想与 B 通信

通过向服务器 T1 发送 Allocate 请求,A 得到中继地址和端口为 R1:r1

同理,B发送Allocate请求转服务器T2,B得到中继地址和端口为R2:r2

现在A要向B发送媒体,然后A向R1:r1发送媒体,以R2:r2为目的地址,当turn server在R2:r2接收到​​媒体后,转发给B。就是webrtc中的媒体传输,以这种方式转发与否?

如果 A 不知道 B 的中继传输地址,那么 A 如何到达 B?

4

1 回答 1

0

是的,如果您使用 TURN 继电器,这正是它的工作原理。

If A and B want to connect with each other, they must know each others server reflexive or relay address. This applies if A and B are in separate networks. Server reflexive address is NATs public address which is gathered through STUN server. If they don't know any of these two addresses then they can't connect with each other.

If A doesn't know B's relayed transport address then they can connect through server reflexive address.

Even knowing only server reflexive address of each other won't guarantee connection establishment. If one of A or B is behind symmetric NAT and other is behind Symmetric/PRC NAT then A and B must know the turn relay address of each other to guarantee connection establishment.

于 2015-08-07T08:59:31.290 回答