summaryrefslogtreecommitdiff
path: root/icespider/fcgi/main.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2016-06-18 22:43:00 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2016-06-18 22:43:00 +0100
commit9b40e1ec2b84e0442bc6ef6466d5a8a523c82250 (patch)
treeff3566336ac19298f5e21895c49d81ceba3c828a /icespider/fcgi/main.cpp
parentBuild most things by default (diff)
downloadicespider-9b40e1ec2b84e0442bc6ef6466d5a8a523c82250.tar.bz2
icespider-9b40e1ec2b84e0442bc6ef6466d5a8a523c82250.tar.xz
icespider-9b40e1ec2b84e0442bc6ef6466d5a8a523c82250.zip
Initial commit of IceSpider, implements basic route compiler
Diffstat (limited to 'icespider/fcgi/main.cpp')
-rw-r--r--icespider/fcgi/main.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/icespider/fcgi/main.cpp b/icespider/fcgi/main.cpp
new file mode 100644
index 0000000..6132769
--- /dev/null
+++ b/icespider/fcgi/main.cpp
@@ -0,0 +1,22 @@
+#include <fcgio.h>
+
+int
+main(void)
+{
+ if (!FCGX_IsCGI()) {
+ FCGX_Request request;
+
+ FCGX_Init();
+ FCGX_InitRequest(&request, 0, 0);
+
+ while (FCGX_Accept_r(&request) == 0) {
+ // app.process(IO, &IO, IO);
+ FCGX_Finish_r(&request);
+ }
+ return 0;
+ }
+ else {
+ return 1;
+ }
+}
+