c++ - Buggy call to WSACleanup() kills WSAStartup() -
I have an application that is running TCP server to start TCP I WSAStartup () run Then I have to load the third party DLL. DLL also does some TCP jobs and there is some bug in it - it runs
WSAStartup () without running
WSACleanup () . This bug breaks down my TCP server because DLL's
WSACleanup () kills it.
I can not decide dll. How to avoid this situation use the DLL and my TCP server in various threads.
That you can see in, calculating the internal reference, WSAStartup / WSACleanup . So you only have to call WSAStartup twice.
In this way, when your library calls WSACleanup , it will reduce only one internal counting and not release all the resources.
Comments
Post a Comment