Walt Karas
2018-11-13 19:29:30 UTC
In the server_push example plugin, the plugin attaches to the session
start hook globally. But the handling of the session hook event is
this:
case TS_EVENT_HTTP_SSN_START:
ssnp = (TSHttpSsn)edata;
TSHttpSsnHookAdd(ssnp, TS_HTTP_TXN_START_HOOK, contp);
TSHttpSsnReenable(ssnp, TS_EVENT_HTTP_CONTINUE);
break;
What's the advantage of doing it like this, rather than attaching
globally to the transaction start hook?
start hook globally. But the handling of the session hook event is
this:
case TS_EVENT_HTTP_SSN_START:
ssnp = (TSHttpSsn)edata;
TSHttpSsnHookAdd(ssnp, TS_HTTP_TXN_START_HOOK, contp);
TSHttpSsnReenable(ssnp, TS_EVENT_HTTP_CONTINUE);
break;
What's the advantage of doing it like this, rather than attaching
globally to the transaction start hook?