2 #include "resolvproto.h"
9 int sfd = libtcp_open_pasivo(5050); assert(sfd != -1);
10 int cfd = accept(sfd, NULL, NULL); assert(cfd != -1);
12 ResolvProtoRequest rpr(cfd);
13 std::cout << "Recibimos: " << rpr << "\n";
14 ResolvProtoResponse rps(ResolvProtoResponse::RET_OK);
15 rps.ips.push_back(IPAddr("10.10.10.2"));
16 rps.ips.push_back(IPAddr("100.20.45.21"));
17 rps.ips.push_back(IPAddr("230.23.62.189"));
18 std::cout << "Contestamos: " << rps << "\n";
24 // vim: set et sw=4 sts=4 :