Author Topic: DNS in uTasker  (Read 8029 times)

MarcV

  • Guest
DNS in uTasker
« on: May 13, 2008, 03:23:39 PM »
My understanding is that DNS is used to translate an internet address like www.utasker.com to an IP address like 89.110.133.8. Is the same being done in the uTasker? I mean - if the uTasker wants to make a connection to a remote server, can it use DNS automatically to find out the IP address of that server when making the connection, or does one first have to write some DNS code to figure out the IP address, and then use that address to make the connection to the remote host?

I know, yet again one of those questions... ::)

MarcV

  • Guest
Re: DNS in uTasker
« Reply #1 on: May 13, 2008, 03:49:47 PM »
I found out that in the SMTP sample code in the uTasker demo, one first has to resolve using DNS and then use the resulting IP address to make the actual connection to the remote server.

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: DNS in uTasker
« Reply #2 on: May 13, 2008, 08:19:46 PM »
Hi Marc

That is correct. TCP and UDP work purely with IP addresses.

If DNS is to be used to find the IP address it must be performed beforehand. Once the IP is known it can be used as normal and generally as often as needed without using DNS again. Usually DNS is only required once since IP addresses very rarely change. If however a connection fails (when using the IP address which was previously resolved using DNS), the DNS process can be repeated to be sure that it is not due to a change of IP address in the meantime.

Regards

Mark