diff options
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; +}; + +}; |