Hi thanks for the reply. Unfortunately I have another problem now.
My server only ever receives messages sent to it once the client calls the CloseSocket method.
So this works fine (client code)
However the following doesn't
recv(variables); // Receive servers greeting
send(variables); // Send Command
Basically whats happening is the server sends its greeting which is received by the client fine. The client attempts to reply with send but server doesnt receive until client closes socket. Then the client blocks waiting for a reply that wont come.
recv(variables); // Reveive servers greeting (THIS LINE WORKS)
send(variables) // Send Command (Server does not receive this)
recv(variables) // Wait servers reply (Blocks here)
send(variables) // Reply to server (never executes)
Sorry for the lack of information as im off out now, if you need more detail i'll post more when i get back.
I think that maybe if i flush the stream after each client "send" command it might work. Is there a flush command for WinSock?