You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Localhost DNS lookup fails without network connection #524
I mostly use this library on windows to connect to a local server via "wss://localhost". This normally works fine, but when not connected to a network (network cable unplugged and not connected to wifi), IXWebsockets fails to connect to my server.
I tracked it down to failing DNS lookup of localhost. Digging into the code, I see getaddrinfo is configured not to do lookups when a with only a loopback address available (hint AI_ADDRCONFIG is set):
As a workaround I tested to remove that flag and my program started working as expected.
I'm not proficient in winsock etc, so I can't tell if there any specific reason for the flag to be set for the library or can it be removed or made configurable?
Activity
bsergean commentedon Sep 27, 2024
Hey a quick workaround too is to try
wss://127.0.0.1 instead of localhost
Avoid AI_ADDRCONFIG netlink path for DNS lookups (#560, #524) (#589)