As you can see in the WSAStartup
doc, the WSAStartup
/WSACleanup
perform internal reference counting. Therefore all you need to do is call WSAStartup
twice.
Thus, when your library calls WSACleanup
, it will only reduce the internal count by one and not release all resources.