From 6f213b0a8abba8d3ca85e688714c91755741f82c Mon Sep 17 00:00:00 2001 From: Pixel Date: Sun, 13 Nov 2011 15:56:31 -0700 Subject: 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. --- includes/HttpServer.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 includes/HttpServer.h (limited to 'includes/HttpServer.h') 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 +#include + +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; +}; + +}; -- cgit v1.2.3