hints.ai_socktype = SOCK_STREAM;
if(getaddrinfo(host, port, &hints, &res) != 0)
die("error: cannot resolve hostname '%s'\n", host);
hints.ai_socktype = SOCK_STREAM;
if(getaddrinfo(host, port, &hints, &res) != 0)
die("error: cannot resolve hostname '%s'\n", host);