mixing ipv4 and ipv6 with AnyEvent::HTTP

Raphael Geissert geissert at debian.org
Thu Nov 28 23:19:50 CET 2013


Hi,

[not sure about the list's policy, so please keep me CC'ed as I'm not 
subscribed]

I'm working on a tool that sends HTTP requests to a bunch of hosts over ipv4 
and to another bunch (but possibly overalapping) of hosts over ipv6. I must 
force AnyEvent to use the IP family I want and not whatever is returned by 
DNS.

So far I'm doing it by first sending all the requests over ipv4 with:
        $AnyEvent::PROTOCOL{ipv4} = 1;
        $AnyEvent::PROTOCOL{ipv6} = 0;
and then with
        $AnyEvent::PROTOCOL{ipv4} = 0;
        $AnyEvent::PROTOCOL{ipv6} = 1;

for the other set of hosts. It works, but it sucks as I must block and be 
done with v4 before dispatching the v6 requests.

Marc, do you have anything in mind as to how this should be addressed?

I've been thinking about allowing ::HTTP take some sort of "tls context" but 
for the IP family. And unless I misunderstood something, the ka_key would 
also need to take it into account?
(btw, the sessionid key seems to be underdocumented)

Cheers,
-- 
Raphael Geissert - Debian Developer
www.debian.org - get.debian.net



More information about the anyevent mailing list