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?