TCP Programming Project


1 attachmentsSlide 1 of 1attachment_1attachment_1

Unformatted Attachment Preview

4/14/22, 7:44 AM
Assignment # 4 – TCP programming
Assignment # 4 – TCP programming
Start Assignment
Due Thursday by 11:59pm
Points 8
Submitting a file upload
Available Mar 29 at 12:01pm – Apr 14 at 11:59pm 16 days
For this assignment, you will make a TCP connection to a web server to retrieve two different HTML
pages and display the text of those pages on the screen. You do not have to render them as web pages,
just display the text you receive. For this assignment, you have a choice of C/C++, Java or Python.
However, for both parts, the connection to the web server must be made using the language’s socket
API, not a specialized class library or API (like Python’s HTTP.client or Java’s HttpClient). You can use
any method to parse the text to find the second URL (substring search, find(), etc.).
There are two parts to the assignment and each one will be graded separately, so if you only get the first
part working, you will get credit for that part. However, Part 1 must be completed to do Part 2 since Part
1 gives you the information you need for Part 2.
Part 1:
Make a TCP connection to port 23456 of the server at
Sent a properly formatted HTTP header (see the slides) to retrieve the default webpage at that
Receive and display the text of the HTML document the server sends as a reply
If you receive nothing, an error message or an incomplete HTML document, your request may not
have been formatted correctly
Part 2:
The HTML document you received in Part 1 contains the URL for another webpage and your
program must extract that URL and send a second request to the same web server to retrieve that
new web page.
When you receive the new page, display it on the screen.
For both parts, submit your source code and a screenshot showing the results when you run that
program.… 1/2

Purchase answer to see full


Web server

TCP programming

User generated content is uploaded by users for the purposes of learning and should be used following Studypool’s honor code & terms of service.

Looking for this assignment?

do my essay homework

Reviews, comments, and love from our customers and community

Article Writing

Great service so far. Keep doing what you do, I am really impressed by the work done.



PowerPoint Presentation

I am speechless…WoW! Thank you so much! Definitely, the writer is talented person. She provided me with an essay a day early before the due date!

Stacy V.

Part-time student

Dissertation & Thesis

This was a very well-written paper. Great work fast. I was in pretty desperate need for help to finish this paper before the due date, which was in nine hours.

M.H.H. Tony


Annotated Bibliography

I love working with this company. You always go above and beyond and exceed my expectations every time. Kate did a WONDERFUL job. I would highly recommend her.

Francisca N.


Book Report / Review

I received my order wayyyyyyy sooner than I expected. Couldn’t ask for more. Very good at communicating & fast at replying. And change & corrections she put in the effort to go back and change it!

Mary J.


Essay (Any Type)

On time, perfect paper. All concerns & matters I had Tom was able to answer them! I will definitely provide him with more orders!

Prof. Kate (Ph.D)


Case Study

Awesome! Great papers, and early! Thank you so much once again! Definitely recommend to trust James with your assignments! He won’t disappoint!

Kaylin Green


Proofreading & Editing

Thank you Dr. Rebecca for editing my essays! She completed my task literally in 3 hours. For sure will work with her again, she is great and follows all instructions

Rebecca L.


Critical Thinking / Review

Extremely thorough summary, understanding and examples found for social science readings, with edits made as needed and on time. It’s like having a tutoring service available (:

Arnold W.



Perfect!I only paid about $80, which i think was a good price considering what my paper entailed. My paper was done early and it was well written!

Joshua W.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>