gogoNET

IPv6 & Networking 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.…

Continue

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

Latest Blog Posts

Most Popular Blog Posts

Monthly Archives

2010

Training

IoT & IPv6 Networking Conference

Product Information

Fill out my online form.

© 2014   Created by gogo6.

Badges  |  Report an Issue  |  Terms of Service