I have a game I'm working on in C ++ and OpenGL. I created a stream server, which now receives clients (the game) and receives messages from them. Now the game only sends messages. I want both the game and the server to be able to send and receive, but I'm not sure if this is the best way. I considered using a stream for sending and one for receiving, as in the same socket. Now the game works in one thread, and the server creates a separate thread for each client.
Look for suggestions on how to do this for the game, as well as for the server (if your offer is not the same for both). Any questions, feel free to ask :)
Thank!
source
share