-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient.h
More file actions
48 lines (39 loc) · 898 Bytes
/
client.h
File metadata and controls
48 lines (39 loc) · 898 Bytes
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
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <netdb.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <sys/wait.h>
#include <iostream>
#include <vector>
#include <cstring>
#include <bitset>
#include <fstream>
#include <netdb.h>
using namespace std;
//CONSTANTS
const char* toHostName = "localhost"; //Send to Localhost
const char* toPortNum = "23074"; //Edge-Server port
//Function Prototypes
void loadJobs(vector<string> vecStr);
vector<string> loadFile(char* ch);
void loadFileIntoJobs(char* ch);
void sendJobsToServer();
void outputResults(char res[]);
string trim0s(string in);
//Job Struct
struct job{
bool isAnd;
unsigned long a;
unsigned long b;
};
//Member Variables
vector<job> jobs;
int status;
struct addrinfo hints;
struct addrinfo *serverinfo;