Plugin session-2 Spec
Overview
This plugin covers the APIs in the following categories:
It does the following things:
Plugin Specification
In INKPluginInit(), the plugin creates a thread, waits for 5 seconds and destroys it. It creates three INKStat statistic variables: transaction_count, session_count and avg_transactions. It also creates a ConfigData with one element num_ssns and sets it to INKConfig. Then it registers a handler function for the global hook INK_HTTP_SSN_START_HOOK.
On INK_HTTP_SSN_START_HOOK, it increments the INKStat statistic variable session_count and num_ssns in INKConfig. Then it prints out both values. It adds a session hook INK_HTTP_TXN_START_HOOK.
The handler function on INK_HTTP_TXN_START_HOOK increments transaction_count and recalculates avg_transactions, then prints out both values.