Skip to content

dkulinov/HttpReqsUsingSockets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

Daniel Evans Systems Assignment

This is a C++ program/CLI that uses POSIX sockets to make HTTP/1.1 GET REQUESTS and evaluate their speed. Please note that this program will not work on a Windows computer unless a Linux VM is running on it. This program will work on Linux/Unix and MacOS.

To Start Using the Program:

  1. Open up the terminal and go to the correct folder (if you're on Windows, don't forget to switch over to WSL)
  2. Compile the source code found in the systems.cpp file using a C++ compiler you have installed on your computer. (Example for the g++ compiler: g++ systems.cpp -o filename)
  3. Run the executable by typing ./filename

You have 3 options:

  1. "./filename --help": will print out information on how to use the program
  2. "./filename --url <link>": will make an HTTP/1.1 GET REQUEST to a provided <link> and will print out the response to the terminal
  3. "./filename --url <link> --profile <number>": will make a specified <number> of HTTP/1.1 GET REQUESTS to the specified <link> and print out some stats once it finishes. (This option does not print the response. If you'd like to see the response use the previous command)

PLEASE NOTE

  • Do not include "http://" or "www." in the <link> option. You may or may not provide the path. If no path is provided, the request will be made to the "/" path
  • This only works for sites that accept HTTP requests. If the site only accepts HTTPS requests, a message with error 301 will be printed.
  • You cannot use the --profile option without the --url option.
  • You can use the short version of the options (-u, -p, -h)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages