B4X
B4X
DNS Lookup
Do a DNS lookup to resolve a hostname to an IP address.Chilkat B4X Downloads
' This example requires the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
Dim socket As ChilkatSocket
socket.Initialize("socket")
Dim maxWaitMs As Int = 10000
Dim ipAddr As String = socket.DnsLookup("www.chilkatsoft.com", maxWaitMs)
If socket.LastMethodSuccess <> True Then
Log(socket.LastErrorText)
Return
End If
Log("IP Address: " & ipAddr)