From: Vladimír Čunát Date: Wed, 5 Sep 2018 14:55:07 +0000 (+0200) Subject: doc for resolve(): fix some problems (outdated parts) X-Git-Tag: v3.1.0~19^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35637d8764a5420db167987ba1ba4d8b8877f38c;p=thirdparty%2Fknot-resolver.git doc for resolve(): fix some problems (outdated parts) --- diff --git a/daemon/README.rst b/daemon/README.rst index 87c2df0d0..c42ae12a3 100644 --- a/daemon/README.rst +++ b/daemon/README.rst @@ -318,13 +318,14 @@ Environment > user('root') Operation not permitted -.. function:: resolve(name, type[, class = kres.class.IN, options = {}, finish = nil]) +.. function:: resolve(name, type[, class = kres.class.IN, options = {}, finish = nil, init = nil]) :param string name: Query name (e.g. 'com.') :param number type: Query type (e.g. ``kres.type.NS``) :param number class: Query class *(optional)* (e.g. ``kres.class.IN``) - :param number options: Resolution options (see query flags) + :param strings options: Resolution options (see :c:type:`kr_qflags`) :param function finish: Callback to be executed when resolution completes (e.g. `function cb (pkt, req) end`). The callback gets a packet containing the final answer and doesn't have to return anything. + :param function init: Callback to be executed with the :c:type:`kr_request` before resolution starts. :return: boolean The function can also be executed with a table of arguments instead. This is useful if you'd like to skip some arguments, for example: