c++windowssocketswsastartupwsacleanup

Windows socket WSACleanup C++


I am using sockets on my program. Due to I added the WSAStartup. My application runs fine (It is always up till it gets a signal to stop). After getting the signal it stops te problem that if I write the WSACleanup function at the end of my program it crashes and if I remove it it terminates fine.

Thanks


Solution

  • Couldn't resovle and find the problem.The application is using more than just sockets. Although Microsoft reference sais that onevery WSAStartup you must use WSACleanup, well this is not true and the system is releasing things regards that.