I have problem with receive data in client side. I send to server info that player is connect and server make a new player in his vector and send another information to client with id player and coordinates. But i dont know how to receive that data. I tried a while loop but client is stop on this function with loop, i tried thread but thread dont work all the time ;/ Like if i send form server data then if just then thread working i get my data but otherwise i dont get info. How i have to receive data from serwer irrelevant what actualy function get focus from main?