2 ms·
Okay, if we're really starting to do this, then I guess I have to figure out how to upgrade all my code to deal with IPV6. I use the BSD sockets interface for m
by allenbrunson 16y ago
Okay, if we're really starting to do this, then I guess I have to figure out how to upgrade all my code to deal with IPV6. I use the BSD sockets interface for most things.
I assume we'll be living in a mixed IPV4/IPV6 world for awhile. Who's got a tutorial for making a connection to a host using IPV6 if available, but falling back to IPV4 if it isn't?
- dfox 16y agoSee getaddrinfo(3) man page, that should be almost all you want. Making code mixed v4/v6 that way actually seems easier than v4-only solution with gethostbyname(3) and building struct sockaddr manually.