412 Project 3
Loading...
Searching...
No Matches
Request.h
1#ifndef REQUEST_H
2#define REQUEST_H
3
4#include <string>
5
6
13struct Request {
14 std::string ip_in;
15 std::string ip_out;
16 int time;
17 // char job_type;
18
19 Request();
20 Request(std::string ip_in, std::string ip_out, int time, char job_type);
21 std::string create_ip();
22};
23
24#endif
The Request struct represents a network request with incoming and outgoing IPs, a time duration for p...
Definition Request.h:13
std::string create_ip()
Generates a random IP address in the format XXX.XXX.XXX.XXX.
Definition Request.cpp:24
int time
The time required to process the request in clock cycles.
Definition Request.h:16
std::string ip_out
The outgoing IP address of the request.
Definition Request.h:15
std::string ip_in
The incoming IP address of the request.
Definition Request.h:14
Request()
Constructs a new Request object.
Definition Request.cpp:10