[getdns-api] libevent and multiple contexts
Tom Pusateri
pusateri at bangj.com
Mon May 2 20:56:26 UTC 2016
> On May 2, 2016, at 4:53 AM, Willem Toorop <willem at nlnetlabs.nl> wrote:
>
> 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.
Cool. I’ll try this out.
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.getdnsapi.net/pipermail/users/attachments/20160502/0665cc54/attachment.bin>
More information about the Users
mailing list