-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.h
54 lines (46 loc) · 1.15 KB
/
server.h
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
//
// Created by marketingharp on 5/22/24.
//
#ifndef SERVER_H
#define SERVER_H
#include <iostream>
#include <stdio.h>
// #include <signal.h>
#include <stdlib.h>
#include <sstream>
#include <fstream>
#include <cstdio>
#include "networking/cppServerLib-networking.h"
#include <Poco/Net/HTTPRequest.h>
#include <Poco/Net/HTTPResponse.h>
#include <Poco/Net/HTTPServerResponse.h>
#include <Poco/Net/HTTPServerRequestImpl.h>
#include <Poco/Net/HTTPClientSession.h>
#include <Poco/Net/StreamSocket.h>
#include <Poco/Net/SocketStream.h>
#include <Poco/File.h>
#include <Poco/FileStream.h>
#include <Poco/Net/HTTPClientSession.h>
using namespace std;
// using namespace httpparser;
namespace cppServer {
class server : public createServer
{
private:
/* data */
char buffer[30000] = {0};
int newSocket;
char contents[30000] = {0};
int status;
Poco::Net::HTTPRequest request;
string response;
void acceptRequest();
void handleRequest();
void respondToRrequest();
// static void stopHandler(int sig);
public:
server();
void launch();
};
}
#endif //SERVER_H