IPv6 | The Internet of Things

Reuben Hawkins's Blog – December 2010 Archive (1)

Using getaddrinfo effectively

Using getaddrinfo, non-blocking sockets and polling, we can easily choose the first address to connect. The process is simple. Resolve a hostname to a list of IPv4 and IPv6 addresses with getaddrinfo. Create and connect a socket for each of the IP addresses. Make sure the sockets are set to non-blocking before the call to connect. Then poll the sockets for the first to respond. Example code showing exactly now to do this is attached.…


Added by Reuben Hawkins on December 11, 2010 at 2:58am — 3 Comments

Latest Blog Posts

Most Popular Blog Posts

Monthly Archives



IoT Product Information

Fill out my online form.

© 2016   Created by gogo6.   Powered by

Badges  |  Report an Issue  |  Terms of Service