diff options
author | ipknHama <ipknhama@gmail.com> | 2014-04-01 01:51:50 +0900 |
---|---|---|
committer | ipknHama <ipknhama@gmail.com> | 2014-04-01 01:51:50 +0900 |
commit | 4b8c67e2300205200f4f846400d73a03cb3da854 (patch) | |
tree | 46b63650efd6952cf88a62cc0511162af54d896f /flask.h | |
parent | 1e11a177ee6b680b55f01d6090ccd1b2e2b8c51c (diff) | |
download | crow-4b8c67e2300205200f4f846400d73a03cb3da854.tar.gz crow-4b8c67e2300205200f4f846400d73a03cb3da854.zip |
accept connections, print http request parsed information
Diffstat (limited to 'flask.h')
-rw-r--r-- | flask.h | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -1,3 +1,15 @@ +#pragma once +#include <string> +#include <functional> +#include <memory> +#include <future> +#include <stdint.h> + +#include "http_server.h" + +// TEST +#include <iostream> + namespace flask { class Flask @@ -7,8 +19,27 @@ namespace flask { } + void handle() + { + } + + void route(const std::string& url, std::function<std::string()> f) + { + } + + Flask& port(std::uint16_t port) + { + port_ = port; + return *this; + } + void run() { + Server<Flask> server(this, port_); + server.run(); } + private: + uint16_t port_ = 80; }; }; + |