Lines Matching refs:addrs
25 bool resolve(const char* name, const char* port, struct addrinfo** addrs) { in resolve() argument
31 int res = ::getaddrinfo(name, port, &hints, addrs); in resolve()
40 int runClient(struct addrinfo* addrs) { in runClient() argument
42 for (struct addrinfo* addr = addrs; addr != nullptr; addr = addr->ai_next) { in runClient()
52 ::freeaddrinfo(addrs); in runClient()
66 int runServer(struct addrinfo* addrs) { in runServer() argument
68 for (struct addrinfo* addr = addrs; addr != nullptr; addr = addr->ai_next) { in runServer()
78 ::freeaddrinfo(addrs); in runServer()
196 struct addrinfo* addrs = nullptr; in main() local
202 if (!resolve(argv[2], argv[3], &addrs)) { in main()
212 return runClient(addrs); in main()
214 return runServer(addrs); in main()