Hi,

I was just wondering if it would be possible to add an option to force
IPv4 hostname resolution in libdrizzle (disable IPv6).
Such an option would be interesting when connecting to a server that
does not support IPv6 connection (e.g. MySQL server).

Such a change is even more important on the Windows version of
libdrizzle because the Windows version only tries the first address
info returned by getaddrinfo:
- the Windows poll() function times out when the connection is refused
instead of returning the events corresponding events
- this means drizzle_con_wait() returns a timeout error and
drizzle_state_connecting does not try the next address info structures

Adding a connection option that forces IPv4 hostname resolution is
very simple to implement:
- In drizzle_state_addrinfo(), "ai.ai_family" simply needs to be set
to AF_INET instead of AF_UNSPEC when the option is set.

Has anyone got any suggestion?

Marc

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to