1

I want to do LOCAL UDP messaging from a browser. After reading the following response to this question:

Use specific ports for webRTC

I don't believe it's possible. The important distinction between what I am trying to do and what was requested in that question is that I'm not trying to get UPD broadcast messages past the router/firewall.

Referring to the

MDN Signalling article

Each ICE message suggests a communication protocol (TCP or UDP), IP address, port number, and connection type (for example, whether the specified IP is the peer itself or a relay server), as well as any other information needed to link the two computers together, even if there's NAT or other complications between the two.

The important thing to note is this: the only thing your code is responsible for during ICE negotiation is accepting outgoing candidates from the ICE layer and sending them across the signaling connection to the other peer when your onicecandidate handler is executed, and receiving ICE candidate messages from the signaling server (when the "new-ice-candidate" message is received) and delivering them to your ICE layer by calling RTCPeerConnection.addIceCandidate(). That's it. Avoid the temptation to try to make it more complicated than that until you really know what you're doing. That way lies madness.

Community
  • 1
  • 1
hypermiler
  • 1,969
  • 4
  • 19
  • 27

0 Answers0