PowerBuilder
PowerBuilder
Clear the DNS Cache
See more Socket/SSL/TLS Examples
Demonstrates Socket.DnsCacheClear, which clears Chilkat's process-wide in-memory DNS cache so subsequent hostname resolutions perform a new lookup.
Background. The cache is shared by Chilkat objects in the process, so clearing it affects subsequent lookups across the application.
Chilkat PowerBuilder Downloads
integer li_rc
oleobject loo_Socket
loo_Socket = create oleobject
li_rc = loo_Socket.ConnectToNewObject("Chilkat.Socket")
if li_rc < 0 then
destroy loo_Socket
MessageBox("Error","Connecting to COM object failed")
return
end if
// Clear Chilkat's process-wide in-memory DNS cache. Subsequent hostname resolutions perform a new
// lookup as needed. The cache is shared by Chilkat objects in the process.
loo_Socket.DnsCacheClear()
Write-Debug "DNS cache cleared."
destroy loo_Socket