forked from richdrich/junglerunner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhtmltailmain.cpp
More file actions
48 lines (36 loc) · 817 Bytes
/
htmltailmain.cpp
File metadata and controls
48 lines (36 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include <stdlib.h>
#include <iostream>
#include <string>
#include <boost/filesystem.hpp>
#include <boost/thread.hpp>
#include <boost/tokenizer.hpp>
#include <uriparser/Uri.h>
#include "ipcpipe.h"
#include "fcgiserver.h"
#include "runclient.h"
#include "debug.h"
using namespace std;
using namespace boost::filesystem;
int main(int argc, char *argv[]) {
bool serverMode = false;
debug_enabled=false;
for(int argi=1; argi<argc; argi++) {
if(strcmp(argv[argi], "-D")==0 || strcmp(argv[argi], "--server")==0) {
serverMode = true;
}
else if(strcmp(argv[argi], "--debug")==0) {
debug_enabled = true;
}
}
// testing
//IpcPipe::testme();
//exit(0);
if(serverMode) {
(new FcgiServer())->execute();
}
else {
RunClient runClient(argc, argv);
return runClient.run();
}
return 0;
}