Winsock error handling fixes
- Oct 27, 2018
-
-
Monster Iestyn authored
-
Monster Iestyn authored
-
Monster Iestyn authored
Use temporary buffer with a max size of 255 bytes instead of having Microsoft's FormatMessageA alloc one for us. Also, provide a fallback message in case no message was available for some reason
-
Monster Iestyn authored
Save the result of errno (aka WSAGetLastError() for WinSock) as soon as possible, to prevent anything in SOCK_GetNodeAddress resetting the value to 0 while trying to print the message for the error itself!
-
Monster Iestyn authored
Creating a quick get_WSAErrorStr function to act as a wrapper for FormatMessageA so we can string-ify Winsock errors properly Untested!
-