Is STUN server absolutely necessary for webrtc when I have a socket.io based signaling server? -
my understanding stun server webrtc when clients behind nat (in cases, if not all), stun server webrtc clients identify addresses , ports. , read article saying signaling server needed webrtc clients. signaling server web server, socket.io, or emailing url. first question be: stun server signaling server?
actually built simple socket.io based service broadcasts client's session descriptions other clients. believe socket.io based server should have enough knowledge clients' addresses , ports information. if case, why bother have stun server?
thanks, elgs
the stun server not signalling server.
the purpose of signalling server pass information between peers @ start of session(how can send offer without knowing send to?). information includes sdps created on offers , answers , ice candidates created either party.
the reason have stun server 2 peers can send media each other. media streams not hit signalling server instead go straight other party(the definition of peer-to-peer connection), exception case when turn server used.
media cannot magically go through nat or firewall because 2 parties not have direct access each other(like if on same lan).
in short stun server needed large majority of time when 2 parties not on same network(to valid connection candidates peer-to-peer media streaming) , signalling server always needed(whether on different networks or not) negotiation , connection build can take place. good explanation of connection , streaming process
Comments
Post a Comment