I’m using UDP for a game that I am making, but this issue is not nescessarily game-specific. I have noticed that whenever I want to test something locally and I use broadcasting, there’s a chance that the UDP client sending some data out is also the same client receiving it again, instead of the other client also connected from the same machine.
How can I test and debug this effectively on one machine, simulating it in used condition on two machines?
Two options:
client -> serveris port 2001,server -> clientis port 2002.The latter option will not require you to change your code, but you’ll need to copy the server or client application to the VM every time you change the code.