Ticket #5815: http_server.h

File http_server.h, 630 bytes (added by mileandrei@…, 11 years ago)
Line 
1#ifndef _HTTP_SERVER_H
2#define _HTTP_SERVER_H
3
4#include "http_connection.h"
5#include "connection_manager.h"
6
7
8namespace http_server
9{
10
11class cHttpServer : private boost::noncopyable
12{
13public:
14 cHttpServer(unsigned int port);
15 ~cHttpServer();
16
17 void Start();
18 void Stop();
19
20private:
21 void StartAccept();
22 void HandleConnection(connection_ptr new_connection, const boost::system::error_code& error);
23
24private:
25 boost::asio::io_service m_IOService;
26 boost::asio::ip::tcp::acceptor m_Acceptor;
27 cConnectionManager m_ConnectionManager;
28 boost::asio::signal_set m_Signals;
29
30};
31
32}
33
34
35#endif