C++ Retrieve the IP from a name from the DNS - LINUX
In my C++ Linux application: how can I get the IP referring to a name from a DNS?
Please attach code sample开发者_如何学C.
10x
Use getaddrinfo(). Documentation and examples here and here.
With the function gethostbyname.
Please, search in google.
精彩评论