-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRequestHandler.hpp
44 lines (38 loc) · 941 Bytes
/
RequestHandler.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
* NetworkConstants.cpp
*
* Created on: 17-Oct-2019
* Author: Prashant Srivastava
*/
#ifndef REQUEST_HANDLER_HPP_
#define REQUEST_HANDLER_HPP_
#include <boost/asio.hpp>
#include <memory>
#include "StockPredictor.hpp"
/**
* @class RequestHandler
* @brief A class responsible to handle web client requests
*/
class RequestHandler {
public:
/**
* @brief Default Constructor
*/
RequestHandler();
/**
* @brief Default Destructor
*/
virtual ~RequestHandler();
/**
* @brief Method used for starting service for handling request
* @param [in] stockPredictor The pointer to StockPredictor object.
*/
void setupService(const std::shared_ptr<StockPredictor> &stockPredictor);
/**
* @brief Method used for starting listener and receiving request in a thread
*/
void run();
private:
boost::asio::io_context m_ioc; ///< The Boost Async IO context object
};
#endif //! REQUEST_HANDLER_HPP_