简体   繁体   中英

Assuming a user sends his IP and port to another, why does WebRTC need a signaling server for a data connection?

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM