Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi UDP Mux can't works when remote also enables Multi UDP Mux #507

Open
r1a2y3 opened this issue Dec 14, 2022 · 4 comments
Open

Multi UDP Mux can't works when remote also enables Multi UDP Mux #507

r1a2y3 opened this issue Dec 14, 2022 · 4 comments
Labels
bug Something isn't working mux UDP and TCP Mux related issues

Comments

@r1a2y3
Copy link

r1a2y3 commented Dec 14, 2022

Your environment.

  • Version: v2.2.12

What did you do?

I wrote sample code to simulcast multi-udp-mux for both of local and remote, such as two sfu cascade and they both use one signal udp port. And it CANNOT work
sample code

https://go.dev/play/p/PfDDj7VnV2g

What did you expect?

It should work

What happened?

I currently think the reason is current code only use remote address as key in map to save udpMuxedConn, but in this case, all of the remote address is same. But I haven't confirm whether the root cause is it or not.

func (m *UDPMuxDefault) registerConnForAddress(conn *udpMuxedConn, addr string) {
	if m.IsClosed() {
		return
	}

	m.addressMapMu.Lock()
	defer m.addressMapMu.Unlock()

	existing, ok := m.addressMap[addr]
	if ok {
		existing.removeAddress(addr)
	}
	m.addressMap[addr] = conn

	m.params.Logger.Debugf("Registered %s for %s", addr, conn.params.Key)
}
@r1a2y3
Copy link
Author

r1a2y3 commented Dec 14, 2022

@cnderrauber Could you please help confirm it? Thanks very much

@cnderrauber
Copy link
Member

@r1a2y3 I think you are right, the UDPMux does not support mux to mux communication now.

@r1a2y3
Copy link
Author

r1a2y3 commented Jan 9, 2023

@r1a2y3 I think you are right, the UDPMux does not support mux to mux communication now.

Thank you and all your efforts. I'm learning pion now but a little difficult. Hope can do more things in the future.

@stv0g stv0g added mux UDP and TCP Mux related issues bug Something isn't working labels Apr 12, 2023
@stv0g
Copy link
Member

stv0g commented Jul 6, 2023

I would love to hear some details about this as I dont fully understood the root issue here..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mux UDP and TCP Mux related issues
Development

No branches or pull requests

3 participants