Problem:
- Call to send(), returns Winsock Error 10038 against socket handle
Illustration:
acceptedSocket = accept (server, (sockaddr *)&sin, &len);
- accept(), returns 0
- A new thread, is created for each connection
- send(), (in thread function) returns 10038
Illustration: - in thread function
//omitted
SOCKET RemoteSocket = (SOCKET) client;
//omitted
send (RemoteSocket, stringToSpend, strlen(stringToSpend), 0)
Suggestions:
- Possible, race condition?
- Could use I/O completion ports, but not at this stage