Skip to main content
GameDev.net gamedev.net
🔒 Locked

Is Winsock thread-safe?

Started by Karl G Sep 18, 2004 at 1:49 PM 2 replies 3.6k views
Original Post
Karl G
Karl G
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?
Agony
Agony
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 nly, and not for things themselves." - John Locke o
Karl G
Karl G
Thanks for that--it was exactly what I was looking for :)
hplus0603
hplus0603
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 };

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.