Add multi-thread support.

This commit is contained in:
flamingcow
2019-05-04 12:16:31 -07:00
parent 95e9eb0c51
commit e7b2f089f3
4 changed files with 53 additions and 35 deletions

View File

@@ -4,6 +4,7 @@
#include "fastcgi.h"
DEFINE_int32(port, 9000, "TCP port to bind");
DEFINE_int32(threads, 1, "Number of server threads");
int main(int argc, char *argv[]) {
google::InitGoogleLogging(argv[0]);
@@ -13,6 +14,6 @@ int main(int argc, char *argv[]) {
request->WriteHeader("Content-Type", "text/plain");
request->WriteBody("Hello world");
request->End();
});
}, FLAGS_threads);
server.Serve();
}