#include "ace/INET_Addr.h"
void print_all_interfaces()
{
ACE_INET_Addr *the_addr_array;
size_t count = 0;
int rc = ACE::get_ip_interfaces (count , the_addr_array);
char address[30];
int i = 0;
while (i < count)
{
(the_addr_array+i)->addr_to_string(address, sizeof(address));
printf("%s\n", address);
i++;
}
delete [] the_addr_array;
system("pause");
}
在ACE中如何获得本地的ip地址
最新推荐文章于 2024-03-07 09:36:09 发布