假设用户将其IP和端口发送到另一个,为什么WEBRTC需要数据连接的信号服务器?
In all serverless (not including ICE/STUN) implementations of WebRTC, that create a data connection, I've always noticed that the flow is:
- User 1 sends contact info to user 2.
- User 2 processes contact info and sends reponse to user 1.
- Users can now communicate.
我不明白的是为什么我们需要第二步?在桌面应用程序中,即使有NAT(由于电击服务器),第一步就足够了。这是WEBRTC的限制吗?如果是这样,为什么?
In all serverless (not including ICE/STUN) implementations of WebRTC, that create a data connection, I've always noticed that the flow is:
- User 1 sends contact info to user 2.
- User 2 processes contact info and sends reponse to user 1.
- Users can now communicate.
What I don't understand is why do we need the second step? In desktop apps, the first step is enough, even if there's a NAT (due to STUN servers). Is this some WebRTC limitation? If so, why?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
除了 ICE 候选之外,SDP 还包含有关编解码器、轨道等的信息。需要信令服务器作为通道,通过交换此类信息在对等点之间建立连接。
Besides ICE candidates, SDP contains information about codecs, tracks etc. Signaling server is needed as a channel to establish a connection between peers by exchanging such information.