Is Winsock thread-safe?

Started by
2 comments, last by hplus0603 19 years, 7 months ago
I remember reading somewhere that the basic Winsock 2 functions (not those Microsoft WSA-whatevers) are not thread safe. This doesn't make sense though, because Winsock 2 is a DLL file, and to be able to be accessed by multiple programs it must be able to support simultaneous calls to the library functions. Is this true or am I missing something?
Advertisement
According to this, I'd say yes.
"We should have a great fewer disputes in the world if words were taken for what they are, the signs of our ideas only, and not for things themselves." - John Locke
Thanks for that--it was exactly what I was looking for :)
The same DLL doesn't get accessed by multiple processes as of the introduction of Windows 95. Each process gets its own copy of the writable data segment for the DLL. The "all processes share" model was the old Win16 model, which is luckily quite dead and buried by now ;-)
enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement