diff options
author | Pixel <pixel@nobis-crew.org> | 2011-11-13 15:56:31 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-11-13 15:56:36 -0700 |
commit | 6f213b0a8abba8d3ca85e688714c91755741f82c (patch) | |
tree | 903814c0c6fbe28122ccc10efdf016e172d5e7a2 /includes | |
parent | ab52473a09d10e9695a95dddceb9a467572ab694 (diff) |
Adding the skeleton of an HTTP server; still work in progress though: it still needs coding, and won't work as it. And it needs a unit test.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/HttpServer.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/includes/HttpServer.h b/includes/HttpServer.h new file mode 100644 index 0000000..2609283 --- /dev/null +++ b/includes/HttpServer.h @@ -0,0 +1,23 @@ +#pragma once + +#include <BString.h> +#include <Exceptions.h> + +namespace Balau { + +class HttpServer { + public: + HttpServer() : m_started(false), m_listenerPtr(NULL), m_port(80) { } + ~HttpServer() { if (!m_started) stop(); } + void start(); + void stop(); + void setPort(int port) { Assert(!m_started); m_port = port; } + void setLocal(const char * local) { Assert(!m_started); m_local = local; } + private: + bool m_started; + void * m_listenerPtr; + int m_port; + String m_local; +}; + +}; |