On Win 32 API socket programming
Posted on 1998-11-10
My application is Multithreaded. I have a function which performes the following action. The function reads a Host Name from the INI file and tries to retireve the host IP address using gethostbyname(). I am performing a WSAStartup() and WSACleanup() everytime in this function. The function resides in a DLL and is called by lot of threads.
Sometimes, this gethostbyname() call goes to a blocking state and hangs the system.
I would like to know what makes the gethostbyname() block and hang the system?