WebRTC ICE candidate里面的raddr和rport表示什么?

本文深入解析了ICE候选机制中的raddr和rport参数,阐述了它们在调试中的作用,以及如何帮助确定本地端口与远程服务器的关联。特别强调了当类型为relay时,连接将通过TURN服务器进行。

举例如下:

a=candidate:1853887674 1 udp 1518280447 47.61.61.61 36768 typ srflx raddr 192.168.0.196 rport 36768 generation 0

解释:

raddr and rport are for debugging purpose. https://tools.ietf.org/html/rfc5245#appendix-B.3 explains the purpose.

For serverreflexive candidates, raddr/rport allow you figuring out which local port (host candidate) is associated with this candidate. For relay candidates it will do the same, but for a serverreflexive candidate.

As pointed out before, the documentation shows that raddr probably stands for relative address and rport stands for relative port, ie. the local ip address and local port. Also, if the type is "relay", it means the connection is being made through a TURN server.

Full explanation at https://temasys.io/webrtc-ice-sorcery/

 

翻译:

raddr和rport只是用于调试.https://tools.ietf.org/html/rfc5245#appendix-B.3 做了解释.

对于srflx(server reflexive),raddr/rport允许你指出哪个本地端口(host candidate)是和该candidate关联的,对于relay candidates,他的作用是一样的,只是指出哪个server flexive candidate.

像上面所描述的那样,文档显示,raddr可能表示的是relative address(相关地址), rport表示的是relative port(相关端口),比如本地ip地址和本地端口.而且,如果类型是relay,它表示这个连接是通过TURN 服务器建立起来的,完整的解释参考:https://temasys.io/webrtc-ice-sorcery/ .

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值