bool UdpSocket::isConnectNet() //獲取百度的ip地址 如果能獲取到,就證明聯網,返回真 否則返回假
{
struct hostent *host;
host = gethostbyname("www.baidu.com");
if (host)
return true;
else
return false;
}
需要引用個頭文件
#include <netdb.h>
bool UdpSocket::isConnectNet() //獲取百度的ip地址 如果能獲取到,就證明聯網,返回真 否則返回假
{
struct hostent *host;
host = gethostbyname("www.baidu.com");
if (host)
return true;
else
return false;
}
需要引用個頭文件
#include <netdb.h>
#region 登錄信息/// <summary> /// 密碼 /// </summary> private string _Pwd; /// <summary>
https://blog.csdn.net/wai_58934/article/details/126808233
https://blog.csdn.net/qq_44021627/article/details/134175137