使用windows socket进行域名解析
使用windows socket域名解析主要用到了两个函数:gethostbyname()和inet_ntoa(),其中struct hostent*gethostbyname(constchar*name)函数返回对应于给定主机名的包含主机名字和地址信息的hostent结构的指针,参数name需要填入域名;char *inet_ntoa(struct in_addr in);将一个32...
原创
2019-08-24 20:55:14 ·
1292 阅读 ·
0 评论