I decided to learn networking with SFML's networking package, by creating a server for a game i'm working on.
The serverpart is fine atm, and the client is not implemented in the game yet because im writing it in a separate project to debug the server before implementing the code into the game.
To the point: I have a mainloop on the client, wich simply recieves packets from the server throu a selector. But it freezes the mainloop at;
if(this->Selector.Wait()){ HERE IT FREEZES ... codeblabla. .. }
I tried making it without a selector first, then it freezed at Socket.Receive(), i basically just want to recieve packets while updating other code(in this example updating a sf::RenderWindow).
I am not requesting that you write the code for me, i simply want a push in the right direction.
Code for Server:
http://fredrik.haikarainen.se/server.cppCode for Client:
http://fredrik.haikarainen.se/client.cppThanks in advance, would love to know how to get around this !