ICE vs STUN vs TURN [英] ICE vs STUN vs TURN

查看:38
本文介绍了ICE vs STUN vs TURN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读到 ICE 是 WebRTC 服务器上的代理,它将用户的 SDP 信息发送到 STUN 或 TURN 服务器.
STUN 和 TURN 服务器提供此 SDP 信息并为用户建立 P2P 连接.

I've read that ICE is an agent on the WebRTC server which sends SDP information of users to STUN or TURN server.
STUN and TURN server gives this SDP information and makes a P2P connection for the users.

这是真的吗?
那么,STUN 和 TURN 服务器之间的确切区别是什么?
如果ICE代理配置了TURN服务器,数据流会发生什么?在这种情况下,TURN 只是充当数据报转发器?

Is that true?
So, what is the exact difference between STUN and TURN server?
If the ICE agent configured with a TURN server, what would be happened with data flow? in this instance, TURN just act as a datagram-forwarder?

推荐答案

TURN 是一个中继——两个客户端都将数据发送到 TURN 服务器,然后再转发给另一个客户端.

TURN is a relay — both clients send data to the TURN server, which forwards it to the other client.

STUN 不是中继——STUN 服务器帮助客户端之间建立连接"(通过发现和交换它们的外部主机:端口对),之后它们直接相互发送数据.但是,STUN 不适用于所有 NAT/防火墙设置,因此当 STUN 失败时使用 TURN.

STUN is not a relay — the STUN server helps to "make the connection" between the clients (by discovering and exchanging their external host:port pairs), after which they send data to each other directly. However, STUN doesn't work with all NAT/firewall setups, so TURN is used when STUN fails.

这篇关于ICE vs STUN vs TURN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆