Original Post
I have been trying to make a small multithreaded winsock server and client to send data to each other, but I have run into a slight design problem. The setup i have now is that the server has two threads. One thread for recieving data from the client, and one for sending data to the client. The problem with this setup is that it seems to just stop the server from doing anything. I have stepped into it with the debugger and it seems as though the server thread that waits for incoming messages from the client is stopping the server from using the send winsock function to the client. Presumably recv locks the socket so that send cannot use it? The result of all this is that nothing gets sent to the client, and so the client nver responds to anything, and so it gets stuck in recv for ever. Does this sound like a possible course of events? What are the best ways around this? Im using winsock2, and a console based server.