summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2013-04-20 22:27:47 +0200
committerYves Fischer <yvesf-git@xapek.org>2013-04-20 22:27:47 +0200
commiteccf5032895cba746e9aa014c994d412c055106b (patch)
tree798326a74e92f939eae4ff0c634a17ba1ccc5217
parent0fab00a2ff4fbe7c3c56b7bd2dc523eb974aba61 (diff)
downloadebus-alt-eccf5032895cba746e9aa014c994d412c055106b.tar.gz
ebus-alt-eccf5032895cba746e9aa014c994d412c055106b.zip
leveldb: number of threads=10
-rw-r--r--datastore-leveldb/README4
-rw-r--r--datastore-leveldb/src/server.cpp5
2 files changed, 6 insertions, 3 deletions
diff --git a/datastore-leveldb/README b/datastore-leveldb/README
index f71ada1..d2020ae 100644
--- a/datastore-leveldb/README
+++ b/datastore-leveldb/README
@@ -1,3 +1,5 @@
apt-get install \
libleveldb-dev \
- libboost1.49-dev
+ libboost1.49-dev \
+ libboost-regex-dev \
+ g++-4.7
diff --git a/datastore-leveldb/src/server.cpp b/datastore-leveldb/src/server.cpp
index 4776f33..1337466 100644
--- a/datastore-leveldb/src/server.cpp
+++ b/datastore-leveldb/src/server.cpp
@@ -21,10 +21,10 @@ int begin_request_handler(struct mg_connection *conn) {
const struct mg_request_info *request_info = mg_get_request_info(conn);
+ std::cout << request_info->request_method << " "
+ << request_info->uri << std::endl;
for (auto item = web_handler.begin(); item != web_handler.end(); ++item) {
if (boost::regex_match(request_info->uri, match, (*item).first)) {
- std::cout << request_info->request_method << " "
- << request_info->uri << std::endl;
(*item).second(match, conn);
return 1;
}
@@ -45,6 +45,7 @@ void sigint_handler(int s) {
int main(int argc, char **argv) {
struct mg_callbacks callbacks;
const char *options[] = {
+ "num_threads", "10",
"listening_ports", "8080",
"document_root", "wwwroot",
NULL};