Computer Science
C++ TCP connection Program Assignment

Question Description

I’m trying to study for my Computer Science course and I need some help to understand this question.

Write a C++ client program where you:

1. Take in a URL from the user as a command line argument (e.g., https://www.microsoft.com/en-us/windows/features)

2. Make a TCP connection with the server that hosts the URL (e.g., microsoft.com

3. Issue a properly formatted HTTP GET request to the server. Find out how to do that from this source https://www.tutorialspoint.com/http/http_requests....

4. Receive the response, discard the HTTP header part, save the rest (i.e., the HTML content of the page) into disk.

5. To verify that you downloaded the file correctly, download the same page using the linux command wget and save that using another name. Now compare the 2 files (one downloaded using your program and the other downloaded using wget command) using diff command in linux. If there is no difference, you have done it right.

Student has agreed that all tutoring, explanations, and answers provided by the tutor will be used to help in the learning process and in accordance with Studypool's honor code & terms of service.

Final Answer

At...

Tellos (1728)
New York University

Anonymous
The tutor was pretty knowledgeable, efficient and polite. Great service!

Anonymous
Heard about Studypool for a while and finally tried it. Glad I did caus this was really helpful.

Anonymous
Just what I needed… fantastic!

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4