Closed shynome closed 8 months ago
Hi @shynome
Unfortunately that isn't possible with how the UDPMux works. The UDPMux routes traffic by using the Remote IP+Port. This works for most because they accepting many connections from different users. They are able to route the connections appropriately.
When doing UDPMux <-> UDPMux
each side is going to assume the 'new' traffic should be directed to the first PeerConnection. With WebRTC the underlying protocols didn't allow the identification to do this, until recently! If you really need 1 Port <-> 1 Port it can be done by demuxing via.
This would require some work, but if you really can only open one port on each side this is how it will need to be done! Happy to answer more questions either on here or Slack!
but if I add <-webrtc.GatheringCompletePromise(pc)
after create offer, the test is working, this make me confuse.
Thanks for your reply !
I have a test when program crash, can it connect again successfully? yes it can.
My test have some problem, the connection is not lost, keepalive, so server can't free connection.
At last thanks your reply again!
Your environment.
What did you do?
use UDPMux connect twice to another UDPMux
What did you expect?
connect successfully
What happened?
second connect is failed
test code