[getdns-api] libevent and multiple contexts
willem at nlnetlabs.nl
Mon May 2 08:53:49 UTC 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 (*).
(*) though within the same process and thread.
> spec mailing list
> spec at getdnsapi.net
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: OpenPGP digital signature
More information about the spec