Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
socket handling and WIN32 WSACleanup fixes #3663
Just a couple of nitpicks in docs/examples/externalsocket.c:
In the event that servaddr.sin_addr.s_addr is INADDR_NONE, the example code leaks sockfd. This would matter if someone copied the code into a function that wasn't main()... ;-)
Microsoft's Winsock documentation states that a matching call to WSACleanup() should be called for every WSAStartup() call performed.