Added thread class (based on boost::thread). Clarified some commends in Win32 socket code.

This commit is contained in:
lotodore
2007-02-14 00:36:10 +00:00
parent 647ca7ca49
commit f0aa63667c
3 changed files with 185 additions and 1 deletions
+2 -1
View File
@@ -86,7 +86,7 @@ socket_resolve(const char *str, const char *port, int addrFamily, int sockType,
if (hWsock)
{
// Determine functions at runtime, because some operating system do not
// Determine functions at runtime, because some windows systems do not
// support the unicode version of getaddrinfo.
getaddrinfow_ptr_t getaddrinfow_ptr = (getaddrinfow_ptr_t)::GetProcAddress(hWsock, "GetAddrInfoW");
freeaddrinfow_ptr_t freeaddrinfow_ptr = (freeaddrinfow_ptr_t)::GetProcAddress(hWsock, "FreeAddrInfoW");
@@ -106,6 +106,7 @@ socket_resolve(const char *str, const char *port, int addrFamily, int sockType,
aiHints.ai_socktype = sockType;
aiHints.ai_protocol = protocol;
// resolve the name (unicode).
bool success = (getaddrinfow_ptr(wstr.c_str(), wport.c_str(), &aiHints, &aiList) == 0);
if (success && aiList)