-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRequestHandler.h
More file actions
61 lines (39 loc) · 1.18 KB
/
RequestHandler.h
File metadata and controls
61 lines (39 loc) · 1.18 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//
// Created by Sierra Kilo on 09-Mar-19.
//
#ifndef EZREMOTE_PROJECT_REQUESTHANDLER_H
#define EZREMOTE_PROJECT_REQUESTHANDLER_H
#include <string>
#include <thread>
#include "ConnectionHandler.h"
#include "CommandExec.h"
#include "JSON.h"
#include "AppState.h"
class RequestHandler:ConnectionHandler {
private:
AppState* appState;
SOCKET clientSocket;
CommandExec commandExec;
bool terminateRequestHandler;
void sendMessage(const char *outbound_msg);
void handleRequestAndReply(std::string receivedMsg);
nlohmann::json processReceivedMessage(std::string received_msg);
public:
// delete default constructor
RequestHandler() = delete;
RequestHandler(AppState* appState, SOCKET clientSocket);
// //Delete the copy constructor
// RequestHandler(const RequestHandler&) = delete;
//
// //Delete the Assignment operator
// RequestHandler& operator=(const RequestHandler&) = delete;
//
// // Move Constructor
// RequestHandler(RequestHandler&& obj);
//
// //Move Assignment Operator
// RequestHandler& operator=(RequestHandler&& obj);
void requestListener();
~RequestHandler();
};
#endif //EZREMOTE_PROJECT_REQUESTHANDLER_H