@@ -44,26 +44,34 @@ function for callback amounts to adding the function to a hook. You
4444can register your plugin to be called back for every single
4545transaction, or for specific transactions only.
4646
47- HTTP :term: `transaction ` hooks are set on a global basis using the function
48- :func: `TSHttpHookAdd `. This means that the continuation specified
49- as the parameter to :func: `TSHttpHookAdd ` is called for every
50- transaction. :func: `TSHttpHookAdd ` must only be called from
51- :func: `TSPluginInit ` or :func: `TSRemapInit `.
47+ HTTP :term: `transaction ` and :term: `session ` hooks are set on a
48+ global basis using the function :func: `TSHttpHookAdd `. This means
49+ that the continuation specified as the parameter to :func: `TSHttpHookAdd `
50+ is called for every transaction. :func: `TSHttpHookAdd ` must only be called from
51+ :func: `TSPluginInit ` or :func: `TSRemapInit `. Continuations set on a
52+ global hook will run before any continuations set on the session/transaction
53+ hook with the same hook ID.
5254
5355:func: `TSHttpSsnHookAdd ` adds :arg: `contp ` to
5456the end of the list of HTTP :term: `session ` hooks specified by :arg: `id `.
5557This means that :arg: `contp ` is called back for every transaction
5658within the session, at the point specified by the hook ID. Since
5759:arg: `contp ` is added to a session, it is not possible to call
5860:func: `TSHttpSsnHookAdd ` from the plugin initialization routine;
59- the plugin needs a handle to an HTTP session.
61+ the plugin needs a handle to an HTTP session. Continuations set on a
62+ session hook will run before any continuations set on the transaction
63+ hook with the same hook ID. This fucnction can be called from handler
64+ functions of continuations on a global per-session hook, including for
65+ the session hook with the same ID.
6066
6167:func: `TSHttpTxnHookAdd ` adds :arg: `contp `
6268to the end of the list of HTTP transaction hooks specified by
6369:arg: `id `. Since :arg: `contp ` is added to a transaction, it is
6470not possible to call :func: `TSHttpTxnHookAdd ` from the plugin
6571initialization routine but only when the plugin has a handle to an
66- HTTP transaction.
72+ HTTP transaction. This fucnction can be called from handler
73+ functions of continuations on a global or session per-transaction
74+ hook, including the for transaction hook with the same ID.
6775
6876A single continuation can be attached to multiple hooks at the same time.
6977It is good practice to conserve resources by reusing hooks in this way
0 commit comments