]> git.llucax.com Git - z.facultad/75.74/practicos.git/blob - practicas/pipi/src/test_resolvproto.cpp
ba1c13694bda568d71a81fabfb65ab1a38d379b9
[z.facultad/75.74/practicos.git] / practicas / pipi / src / test_resolvproto.cpp
1
2 #include "resolvproto.h"
3 #include "libtcp.h"
4 #include <iostream>
5 #include <cassert>
6
7 int main()
8 {
9     ResolvProtoRequest req("hola.tito", ResolvProtoRequest::QT_RECURSIVE);
10     std::cout << "Request Original: " << req << "\n";
11     ResolvProtoRequest req2 = std::string(req);
12     std::cout << "Request Reconstruido: " << req2 << "\n";
13     ResolvProtoResponse res(ResolvProtoResponse::R_A, 600);
14     res.ips.push_back(IPAddr("10.10.10.2"));
15     res.ips.push_back(IPAddr("100.20.45.21"));
16     res.ips.push_back(IPAddr("230.23.62.189"));
17     std::cout << "Response Original: " << res << "\n";
18     ResolvProtoResponse res2 = std::string(res);
19     std::cout << "Response Reconstruido: " << res2 << "\n";
20     return 0;
21 }
22
23 // vim: set et sw=4 sts=4 :