[getdns-api] libevent and multiple contexts
Willem Toorop
willem at nlnetlabs.nl
Mon May 2 10:53:49 CEST 2016
Op 01-05-16 om 19:29 schreef Tom Pusateri:
> I’ve been looking at the example code in the spec and there is a function
> getdns_extension_set_libevent_base(context, event_base).
>
> I am using libevent to handle multiple DNS queries and responses but some are UDP only, some are TLS and have different context parameters.
>
> So my question is, can I create several contexts and have them all point to the same libevent base?
Hi Tom, this is perfectly possible. One event base can be shared
between your application and multiple getdns contexts (*).
Cheers,
-- Willem
(*) though within the same process and thread.
>
> Thanks,
> Tom
>
>
>
> _______________________________________________
> spec mailing list
> spec at getdnsapi.net
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://getdnsapi.net/pipermail/spec/attachments/20160502/4a076416/attachment.bin>
More information about the spec
mailing list