opengsq-python icon indicating copy to clipboard operation
opengsq-python copied to clipboard

fix: explicitly use remote addr for unicast UDP queries

Open thegamecracks opened this issue 2 months ago • 3 comments

This fixes #51 by passing remote_addr= to loop.create_datagram_endpoint() inside UdpClient.communicate(), omitting the local_addr= argument for protocols that don't specify a source port or allow broadcasting.

This PR may have side effects that I don't know about, since I don't often use the low-level asyncio APIs or sockets in general.

thegamecracks avatar Oct 27 '25 15:10 thegamecracks

This could indeed break things on the socket communication. I need to double check it and test it on my own in all scenarios, where unicast and broadcast communication is going on.

Still suprised me like mentioned in #51 that this behavior change in Windows.

My week is now stuffed sadly, so I need some time to verify that.

Hornochs avatar Oct 28 '25 20:10 Hornochs

I'm currently Testing some games. The good news:

Broadcasts Games like Renegade X are still working. I need to test UT3 and Source games too and then I can give an opinion about this. Next step would be to test Windows. We'll see it. I'll update you ASAP

Hornochs avatar Nov 11 '25 10:11 Hornochs

Soooo I tested a couple of my protocols. Everything was working fine, discovering via Broadcast, Unicast etc. So in my eyes it should work. We need to see later if this change breaks more. Of so we need to roll back, but we're using git, so we can roll back

Hornochs avatar Nov 11 '25 11:11 Hornochs