假设用户将其IP和端口发送到另一个,为什么WEBRTC需要数据连接的信号服务器?

发布于 2025-01-17 12:33:17 字数 390 浏览 5 评论 0原文

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

ぃ弥猫深巷。 2025-01-24 12:33:18

除了 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文