When setting a tcpSocket address, I was wondering if it accepts sub-domain type addresses?


myTcpSocket.address = “

The reason I ask is because I can’t get it to connect this way, but if I put the IP in (such as myTcpSocket.address = “”) then it works. When I PING the “” from the command-line in windows, the same IP address I use to connect comes back with the reply. Anybody have any ideas?

It seems TCPSocket.Address only accept IPs. Have you considered the use of LookupIPAddress ?:

myTcpSocket.address = System.Network.LookupIPAddress("")

Didn’t even know about the lookUpIpAddress function… tried it, and it worked like a champ. Thanks, Guy!

if I remember correctly the address property will accept whatever DNS can lookup, so it does the lookup internally.

myTcpSocket.address does take DNS names and if your OS resolves the name to an IP it works fine.

I use DNS names all the time. As long as the name can be resolved it should work

Sometimes I need to query specific DNS servers from Windows 7/8 client. The lookUpIpAddress function doesn’t have that option.

As a workaround I do this:

[code] Dim s As Shell = New Shell

Dim setDNS, unsetDNS as string
setDNS = “netsh interface ip set dns “+ “”“Wireless Network Connection”””+" “+ “static”
unsetDNS = “netsh interface ip set dns “+ “”“Wireless Network Connection”””+” "+ “static”

dim ip as string = System.Network.LookupIPAddress(“”)