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

use getaddrinfo over gethostbyname #689

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

Conversation

louix
Copy link

@louix louix commented Jun 6, 2024

Note The gethostbyname function has been deprecated by the introduction of the getaddrinfo function. Developers creating Windows Sockets 2 applications are urged to use the getaddrinfo function instead of gethostbyname.

https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-gethostbyname

Returns a single IPv4 address for a given hostname. This function is discouraged for new development because it is limited to IPv4 addresses.

https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/NetworkingTopics/Articles/ResolvingDNSHostnames.html#//apple_ref/doc/uid/TP40012543-SW3

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