优化左键点击Yama托盘图标的效果
This commit is contained in:
@@ -91,6 +91,11 @@ IOCPClient::~IOCPClient()
|
||||
inline string GetIPAddress(const char *hostName)
|
||||
{
|
||||
struct hostent *host = gethostbyname(hostName);
|
||||
#ifdef _DEBUG
|
||||
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>IP<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ: %s.\n", host->h_addrtype == AF_INET ? "IPV4" : "IPV6");
|
||||
for (int i = 0; host->h_addr_list[i]; ++i)
|
||||
printf("<EFBFBD><EFBFBD>ȡ<EFBFBD>ĵ<EFBFBD>%d<><64>IP: %s\n", i+1, inet_ntoa(*(struct in_addr*)host->h_addr_list[i]));
|
||||
#endif
|
||||
return host ? inet_ntoa(*(struct in_addr*)host->h_addr_list[0]) : "";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user