multiple clients listening on one port

hello,

sometimes when i start the client of my game twice, the receiving of the messages does not work on the one started secondly.
i am assuming this is caused by the fact, that both listen on the same port and only the first one, gets all the messages.

though, on the other hand, sometimes it does work! both clients get their messages correctly!

what is the real cause of this? and how can it be avoided?

Well…obviously you can’t have two applications listening on the same port so I think you’re going to have to post some code so we can figure out what you ARE doing. :stuck_out_tongue:

if we’re really talking about clients they don’t have to listen at all. They connect to server and use that connection to read / write. But as sunsett said, from the things you said (mostly not said) it could be anything. You need to explain logic in details or / and show us some code.