Functions | |
getdns_return_t | getdns_strerror (getdns_return_t err, char *buf, size_t buflen) |
getdns_return_t | getdns_context_process_async (getdns_context *context) |
uint32_t | getdns_context_get_num_pending_requests (const getdns_context *context, struct timeval *next_timeout) |
getdns_return_t | getdns_context_detach_eventloop (getdns_context *context) |
getdns_return_t | getdns_context_set_use_threads (getdns_context *context, int use_threads) |
Detailed Description
Function Documentation
◆ getdns_strerror()
getdns_return_t getdns_strerror | ( | getdns_return_t | err, |
char * | buf, | ||
size_t | buflen | ||
) |
WARNING! Function getdns_strerror is not in the API specification and is likely to be removed from future versions of our implementation, to be replaced by getdns_get_errorstr_by_id or something similar. Please use getdns_get_errorstr_by_id instead of getdns_strerror.
◆ getdns_context_process_async()
getdns_return_t getdns_context_process_async | ( | getdns_context * | context | ) |
Runs the event loop once non blocking. WARNING! Do not use this function. This function will be removed in future versions of getdns.
◆ getdns_context_get_num_pending_requests()
uint32_t getdns_context_get_num_pending_requests | ( | const getdns_context * | context, |
struct timeval * | next_timeout | ||
) |
Return the number of pending requests and the point of time of the next timeout. WARNING! Do not use this function. This function will be removed in future versions of getdns.
◆ getdns_context_detach_eventloop()
getdns_return_t getdns_context_detach_eventloop | ( | getdns_context * | context | ) |
Detach the eventloop from the context. Resets the context with the default event loop based on poll(). WARNING! Do not use this function. It is For internal use only and may disappear in future releases.
- Parameters
-
context The context to reset to default event loop usage
- Returns
- GETDNS_RETURN_GOOD when successful
- GETDNS_RETURN_INVALID_PARAMETER when context is NULL
◆ getdns_context_set_use_threads()
getdns_return_t getdns_context_set_use_threads | ( | getdns_context * | context, |
int | use_threads | ||
) |
Tell underlying unbound context to use background threads or fork. This is only relevant for libunbound version before 1.5.9. After this version the underlying unbound will share the event loop with getdns eliminating the use for threads. Since the need for this function is doubtful and likely to disappear in the future, use is strongly discouraged.
- Parameters
-
context The context to configure use_threads is either 1 to use threads, or 0 to use fork
- Returns
- GETDNS_RETURN_GOOD on success
- GETDNS_RETURN_INVALID_PARAMETER if context is NULL