如何使用FastCGI应用程序扩展C ++ HTTP服务器? [英] How to extend C++ HTTP server with FastCGI applications?
问题描述
我正在编写C ++ HTTP服务器.但是因为用C ++进行开发(例如在PHP中)速度较慢,所以我还希望支持FastCGI应用程序(通过FastCGI的PHP,通过FastCGI的Python等).所以我想使用类似于mod_fcgi的东西(对于Apache).有人知道一个好的C ++ FastCGI库(不是针对应用程序而是针对Web服务器)吗?我使用Poco库编写Web服务器.
I am writing a C++ HTTP server. But because developing in C++ is slower as for example in PHP I want to also support FastCGI applications (PHP via FastCGI, Python via FastCGI, etc.). So I want to use something similar to mod_fcgi (for Apache). Does someone know a good C++ FastCGI library (not for applications but for the webserver) ? I use the Poco library to write the webserver.
另一个解决方案可能是直接在我的C ++服务器中使用PHP解释器.有人知道一些例子吗?
Another solution could be to use an PHP interpreter directly in my C++ server. Does anybody know some examples for this?
所有解决方案都必须考虑性能.
All solutions must have performance in mind.
推荐答案
我找不到FastCGI客户端,所以我自己写了它. 这是很多工作,但我成功了:) 它比普通的旧CGI快很多(不是!).
I could not find a FastCGI client, so I wrote it myself. It was a lot of work, but i succeeded :) It is a lot faster then plain old CGI (duh!).
这篇关于如何使用FastCGI应用程序扩展C ++ HTTP服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!