Okay. I have determine one major problem, or should I say characteristic of WSASend and/or WSARecv.
For some reason, I cannot call WSASend one after another. For example, let say I call WSASend to send a 4 byte buffer to the client indicating the size of the incoming data. That works find and the client receives the first WSASend package without problems. However, for some reason I cannot call WSASend the second time to send the actual package. The error on the *sending* side is WSAEFAULT:
// WSAEFAULT: "Bad address"
The error on the *receiving* side is WSAEWOULDBLOCK:
// WSAEWOULDBLOCK: "Resource temporarily unavailable"
The bottomline is I cannot send two data buffer consecutively. I am using the WSAAsyncSelect I/O Mode. Is there a specific specification that I missed as far as sending and receiving?
Please message me if you have any ideas.
Thanks,
Kuphryn