共有 0 个贴子
没有任何数据可供显示
开源项目社区 | 当前位置 : |
|
www.trustie.net/open_source_projects | 主页 > 开源项目社区 > fastcgi-app |
fastcgi-app
|
0 | 0 | 3 |
贡献者 | 讨论 | 代码提交 |
This library is a harness for creating FastCGI applications in C++ which are easy to test on the command line. It's as simple as
#include
class HelloWorld : public fastcgi::app
{
public:
fastcgi::app::status
accept( std::istream & in,
std::ostream & out,
std::ostream & err,
char ** envp
)
{
out << "Status: 200\r\n"
"Content-Type: text/plain\r\n"
"\r\n"
;;
out << "Hello World Wide Web!" << std::endl;
return 0;
}
};
extern
fastcgi::app::ptr fastcgi::instantiate( )
{ return fastcgi::app::ptr(new HelloWorld()); }
//