开发者

C++ Retrieve the IP from a name from the DNS - LINUX

开发者 https://www.devze.com 2023-02-06 21:46 出处:网络
In my C++ Linux application: how can I get the IP referring to a name from a DNS? Please attach code sample开发者_如何学C.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消