I have made a online player game in which i use TCP connection between server and client, and UDP (DatagramSocket) between clients (its a real time game). My problem is that i can play with some friends but no with others, that is to say, my UDP connection works only with some PCs. I think the only possible reason for
Tag: block
is there a ‘block until condition becomes true’ function in java?
I’m writing a listener thread for a server, and at the moment I’m using: With the code above, I’m running into issues with the run function eating all the cpu time looping. The sleep function works, but it seems be a makeshift fix, not a solution. Is there some function which would block until the variable ‘condition’ became ‘true’? Or