[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] bufferevent_socket_connect_hostname and evdns_base not working
On Sat, Oct 1, 2011 at 3:51 PM, Juan Pablo Fernandez
<this.juan@xxxxxxxxx> wrote:
> Hi,
>
> I'm trying to get a async dns lookup with
> bufferevent_socket_connect_hostname but I always get 11003 (dns_error)
> in bufferevent_connect_getaddrinfo_cb.
Do the unit tests work for you? They are supposed to test this case.
> The thing is if I call bufferevent_socket_connect_hostname with
> evdns_base == NULL it connects just fine.
Using evdns_base==NULL in that call results in a blocking lookup;
probably not what you want.
> I'm using latest libevent (2.0.14) on windows 7, using vs 2010.
>
> event_cb(bufferevent * bev=0x00000000138634e0, short events=32, void *
> ptr=0x0000000013862230)
Hm. This looks like it's happening in the event_cb function you provided.
Have you tried calling bufferevent_socket_get_dns_error() in your
event_cb function? It's supposed to tell you what the dns error was,
from the DNS_ERR_* options defined in event2/dns.h .
I'm confused why 11003 would be showing up here at all.
--
Nick
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.