current version
[opsoft_test.git] / gclib2 / unit_tests / dns2.cxx
blob7ef747b4aa6354872b01ad7d2f68c7243291f14f
1 /*
2 * (c) Oleg Puchinin 2008
3 * graycardinalster@gmail.com
5 */
7 #include <gclib2.h>
8 #include <dns.h>
10 int main (int argc, char ** argv)
12 DNS * m_dns;
14 m_dns = new DNS;
15 m_dns->async_A ("mail.ru");
16 m_dns->async_A ("yandex.ru");
17 m_dns->async_A ("google.ru");
19 sleep (3);
20 while (m_dns->loop ());
23 printf ("%s\n", m_dns->async_A ("mail.ru"));
24 printf ("%s\n", m_dns->async_A ("yandex.ru"));
25 printf ("%s\n", m_dns->async_A ("google.ru"));
27 delete m_dns;
29 return EXIT_SUCCESS;