In lua it's something like this:
sk=net.createConnection(net.TCP, 0)
sk:dns("www.domain.com",function(conn,ip) print(ip) end)
sk = nil
In shell its
dig www.domain.com
that returns:
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24980
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;www.domain.com. IN A
;; ANSWER SECTION:
www.domain.com. 30 IN CNAME domain.com.
domain.com. 30 IN A 169.45.92.196
How do i do the same thing using the Arduino sketch?