Aggie Student Toolkit — Load Balancer CSCE 412 Project 4
Arnav Fotedar · Fall 2026 · C++ load balancer simulation
Loading...
Searching...
No Matches
Request.h File Reference

Defines the Request structure and its JobType that flow through the load balancer. More...

#include <string>

Go to the source code of this file.

Classes

struct  Request
 A single web request waiting for, or receiving, service. More...

Enumerations

enum class  JobType : char { Processing = 'P' , Streaming = 'S' }
 Category of work carried by a Request. More...

Functions

char jobTypeCode (JobType type)
 Returns the one-letter code for a job type ('P' or 'S').

Detailed Description

Defines the Request structure and its JobType that flow through the load balancer.

Author
Arnav Fotedar

Definition in file Request.h.

Enumeration Type Documentation

◆ JobType

enum class JobType : char
strong

Category of work carried by a Request.

The category does not change how a WebServer processes a request. It is used by the Switch (bonus) to route processing and streaming traffic to separate load balancers.

Enumerator
Processing 

Short computational job, such as rendering a page or running a query.

Streaming 

Long-lived transfer, such as streaming media or a large download.

Definition at line 19 of file Request.h.

Function Documentation

◆ jobTypeCode()

char jobTypeCode ( JobType type)
inline

Returns the one-letter code for a job type ('P' or 'S').

Parameters
typeJob type to convert.
Returns
'P' for processing work, 'S' for streaming work.

Definition at line 29 of file Request.h.