New code should really use the <em>getaddrinfo</em> call to convert the address and port information into one or more <em>struct&nbsp;sockaddr</em> values. It's a bit more involved but it gets you compatibility with IPv6 almost for free.