我正在閱讀Apache2.2的源代碼,並且發現當我使用prefork模塊時,它會調用ap_process_connection
來處理連接,並在此方法中調用ap_run_pre_connection
。
說到這裏,我找不到ap_run_pre_connection
和pre_connection
(我找到一個名爲AP_DECLARE_HOOK的宏,它在名稱pre_connection
之前鏈接了ap
和_hook_
)。
我在哪裏可以找到下一步?Apache httpd源代碼中的函數ap_run_pre_connection在哪裏?
1
A
回答
2
您可以通過查找ap_hook_pre_connection找到參與此掛鉤的模塊。
AP_IMPLEMENT_HOOK_RUN_ALL(INT,pre_connection,(conn_rec * C,void *的CSD),(C,CSD),OK,DECLINED)
AP_IMPLEMENT_HOOK_RUN_ALL意味着多個模塊調用ap_hook_pre_connection()將被運行,直到一個錯誤是返回
/**
* Implement an Apache core hook that runs until one of the functions
* returns something other than ok or decline. That return value is
* then returned from the hook runner. If the hooks run to completion,
* then ok is returned. Note that if no hook runs it would probably be
* more correct to return decline, but this currently does not do
* so. The implementation is called ap_run_<i>name</i>.
ap_run_pre_connection的實際impl只是一個通過註冊函數的鏈表進行循環的宏。請參閱apr_hooks.h
相關問題
- 1. Apache Ignite 2.x源代碼在哪裏?
- 2. jQuery源代碼中的width()函數在哪裏?
- 3. iText源代碼在哪裏?
- 4. libOAuth.a源代碼在哪裏?
- 5. 在android源代碼中定義了以下函數在哪裏?
- 6. python鏈中的源代碼在哪裏?
- 7. Django源代碼中的Model.py在哪裏?
- 8. `form_widget()`Twig函數的代碼在哪裏?
- 9. 我在哪裏可以找到itertools.combinations()函數的源代碼
- 10. Apache Ant「應用」任務的源代碼在哪裏?
- 11. Linux的usb_storage的源代碼在哪裏
- 12. 我在哪裏可以找到JavaScript本機函數源代碼?
- 13. 哪裏是Tensorflow中adadelta的源代碼?
- 14. GNU C庫的源代碼在哪裏?
- 15. RippleDrawable的源代碼在哪裏? (Android L)
- 16. Python itertools.islice的源代碼在哪裏?
- 17. Android adb的Windows源代碼在哪裏?
- 18. NInject.Framework.Web的源代碼在哪裏?
- 19. AutoScriptWriter的源代碼在哪裏
- 20. Html.TextBox的源代碼在哪裏
- 21. Python雞蛋的源代碼在哪裏?
- 22. ghc-prim的源代碼在哪裏?
- 23. isnan的源代碼在哪裏?
- 24. F#3.1.2的源代碼在哪裏?
- 25. nvelocity的最新源代碼在哪裏
- 26. jar程序的源代碼在哪裏?
- 27. 目前,JUnit的源代碼在哪裏?
- 28. IEnumerator的源代碼在哪裏?
- 29. maven-properties-plugin的源代碼在哪裏?
- 30. /usr/bin/lock的源代碼在哪裏?
非常感謝。 – bixiaopeng