Hi, i have a server which randomly crashes on occasion and im trying to hunt down the problem. Im just wonder, are winsock functions thread safe? i should point out im using winsock 1.1
Hi, i have a server which randomly crashes on occasion and im trying to hunt down the problem. Im just wonder, are winsock functions thread safe? i should point out im using winsock 1.1
What do you mean? Are you using the same socket in multiple threads?
gg
If you are using blocking sockets then not really. The blocking socket will sit there until something happens which is never good for a thread.
But besides that yes sockets are safe. I've got a server running in a thread which then fires off more threads to serve the connections and it works just fine. I would not recommend attempting to share a socket acrossed a thread though.