-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
IPV6 support on tcp_client.h #2784
Comments
That structure is a hint, and See: https://learn.microsoft.com/en-us/windows/win32/api/ws2tcpip/nf-ws2tcpip-getaddrinfo |
So on my ipv6 rocky8/redhat environments I get "::getaddrinfo failed: Name or service not known" error. Which clearly does exist and sure enough no problem on ipv4. If I try with the service ip address (IPv6) I got "address family not supported" whiles it does work with a proper ipv4 address. |
Are you saying that passing an IPv6 string will not work? If so, it may have to be |
So on some linux/c version - at least - they are incompatible. AF_UNSPEC is a better approach or at least we are better making it configurable. |
@Simon-Janos PR is welcome. |
Implemented in #2790 |
Hi,
I have noticed in connect() of tcp_client.h (and of tcp_client-windows.h as well) that it is tied to IPv4, could it be changed AF_UNSPEC for ipv6 support?
hints.ai_family = AF_INET; // IPv4
https://github.com/gabime/spdlog/blob/v1.x/include/spdlog/details/tcp_client.h#L61
https://github.com/gabime/spdlog/blob/v1.x/include/spdlog/details/tcp_client-windows.h#L86
Sincerely,
Janis
The text was updated successfully, but these errors were encountered: