1

I'm trying to use libevent and evhttp to get some data off a site. I've based my program on this. It works perfectly with ipv4 but I would like to use it with ipv6 as well. I get the ip so there is no need to resolve hosts.

Does libevent (using 2.0.21) have ipv6 support?

I checked my IPv6 config using http://ipv6.test-ipv6.com/ and it should be ok.

Community
  • 1
  • 1
gkres
  • 668
  • 1
  • 8
  • 17
  • What's going wrong then? Have a strace output? Does it use getaddrinfo() or inet_pton() internally? If the former, what's in your gai.conf? – hroptatyr Feb 18 '13 at 07:21

1 Answers1

1

Ye, libevent does have IPv6 support, see for example :

http://archives.seul.org/libevent/users/Feb-2011/msg00011.html

This is of course also true for the evhttp component.

Remi Gacogne
  • 4,655
  • 1
  • 18
  • 22
  • I'm using the code from my link and going off that. It uses evhttp_connection_new() to connect to a server, which takes address as string. How exactly are the functions you linked relevant to this? – gkres Feb 13 '13 at 18:50
  • Well, as you weren't providing the related code, I assumed you were asking if libevent has IPv6 support. After some testing, it seems that the evhttp code had some bugs related to IPv6, and I strongly believe that your issue has been fixed by this commit, even if the commit summary is a bit misleading : http://levent.git.sourceforge.net/git/gitweb.cgi?p=levent/libevent;a=commit;h=71e709c7829275a594f767b27468b1b52e8b5bb9 – Remi Gacogne Feb 18 '13 at 22:26