Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

void PIPSocket::ClearNameCache (  )  [static, inherited]

Clear the name (DNS) cache.

Definition at line 1705 of file sockets.cxx.

References PTimeInterval::GetInterval().

{
  pHostByName().mutex.Wait();
  pHostByAddr().mutex.Wait();
  pHostByName().RemoveAll();
  pHostByAddr().RemoveAll();
#if (defined(_WIN32) || defined(WINDOWS)) && !defined(__NUCLEUS_MNT__) // Kludge to avoid strange NT bug
  static PTimeInterval delay = GetConfigTime("NT Bug Delay", 0);
  if (delay != 0) {
    ::Sleep(delay.GetInterval());
    ::gethostbyname("www.microsoft.com");
  }
#endif
  pHostByName().mutex.Signal();
  pHostByAddr().mutex.Signal();
}


Generated by  Doxygen 1.6.0   Back to index