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.,

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

3. Issue a properly formatted HTTP GET request to the server. Find out how to do that from this source

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


Tellos (1728)
New York University

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

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

Just what I needed… fantastic!