get local IP address?

Please post support and help requests here.
dandan607
Posts: 3
Joined: 12 Jun 2012, 10:29

get local IP address?

Postby dandan607 » 12 Jun 2012, 10:42

How can i get local IP address using POCO library?

alex
Posts: 1272
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: get local IP address?

Postby alex » 12 Jun 2012, 20:39

Code: Select all

NetworkInterface::NetworkInterfaceList list = NetworkInterface::list();
NetworkInterface::NetworkInterfaceList::const_iterator it = list.begin();
for (; it != list.end(); ++it)
   std::cout << "Address: " << it->address().toString() << std::endl;

dandan607
Posts: 3
Joined: 12 Jun 2012, 10:29

Re: get local IP address?

Postby dandan607 » 13 Jun 2012, 03:52

There are muliple addresses.How can i get the Ethernet adapter IP address?


Return to “Support”

Who is online

Users browsing this forum: No registered users and 1 guest