• Content count

  • Joined

  • Last visited

Community Reputation

107 Neutral

About ElCommunist

  • Rank
  1. Thanks for your answers :-)   Finally I will go with 3STATUK2 idea (synchronous way) and look at game loop performance. I will try later to go asynchronously and compare the two.
  2. Hello everyone, and thanks for your valuable time    I am working on the networking part of a game, using SDL_Net as Networking library. I tried the tutorial about SDL_Net TCP basics, and everything worked fine (server listening, client sending)   But now, I don't really know how to design the communication in both directions : I would like to create one thread listening via the server TCP socket, and another thread sending via the same socket, at the same time (so this is the same TCP connection used for both sending and receiving, potentially simultaneously)) -> Is it safe ? performant ? -> Or do I need to create one TCP connection for sending messages on one thread, and another TCP connection for listening on another thread ?   I know that some TCP connection are duplex which enable what I want, but I don't know about SDL Net...   Again, thanks for your help