I think it makes more sense to try the v4 and v6 addresses in
parallel, instead of one after the other, and then use the first one
to respond.

..m

On Thu, Apr 7, 2011 at 3:20 AM, Marc Isambart <[email protected]> wrote:
> 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
>

_______________________________________________
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