Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try connecting to all possible values returned from getaddrinfo #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

schmir
Copy link
Contributor

@schmir schmir commented Jan 31, 2013

if getaddrinfo returns multiple values, we try to connect to each one
until the first succeeds. we block while doing that, but we probably
already did in getaddrinfo.

however if getaddrinfo returns exactly one value, we still use a
nonblocking connect.

so, if someone want to make sure the connect function doesn't block,
he can use a numeric IP address.

if getaddrinfo returns multiple values, we try to connect to each one
until the first succeeds. we block while doing that, but we probably
already did in getaddrinfo.

however if getaddrinfo returns exactly one value, we still use a
nonblocking connect.

so, if someone want to make sure the connect function doesn't block,
he can use a numeric IP address.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant