Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is a programming assignment in C. (not C++) Write a simple HTTP client and a separate HTTP server application in C using the POSIX

image text in transcribed

This is a programming assignment in C. (not C++) Write a simple HTTP client and a separate HTTP server application in C using the POSIX socket libraries, As soon as the client connects, the server will send a html or tesmall image file which is between 10 to 50K bytes in size ideally. Have the client close the connection once the file is transmitted. Make sure the files are named differently on the client and server side, You must use the POSIX socket functions, . DO NOT implement the server handling multiple requests at the same time (multi-threading) Implement reasonable output messages that show each stage of the socket flow (e.g. "Connected to server" or "Receiving message from server", etc) Submit: client and server) Source code and make file and sample output of the file transfer (both 1. Create the C code and compile it using a make file. 2. Run it on your own machine with a port number specified in the command line For example, type: prog2server 25000) If a service is already running on the port you choose, you will get a BindException or a similar exception. USE THE PORTS YOU WERE ASSIGNED 3. In another window, use Telnet as the client program by typing a command telnet localhost 25000 . This will test that the Server application is working 4. Now test using the C client by typing: prog2client 25000 This is a programming assignment in C. (not C++) Write a simple HTTP client and a separate HTTP server application in C using the POSIX socket libraries, As soon as the client connects, the server will send a html or tesmall image file which is between 10 to 50K bytes in size ideally. Have the client close the connection once the file is transmitted. Make sure the files are named differently on the client and server side, You must use the POSIX socket functions, . DO NOT implement the server handling multiple requests at the same time (multi-threading) Implement reasonable output messages that show each stage of the socket flow (e.g. "Connected to server" or "Receiving message from server", etc) Submit: client and server) Source code and make file and sample output of the file transfer (both 1. Create the C code and compile it using a make file. 2. Run it on your own machine with a port number specified in the command line For example, type: prog2server 25000) If a service is already running on the port you choose, you will get a BindException or a similar exception. USE THE PORTS YOU WERE ASSIGNED 3. In another window, use Telnet as the client program by typing a command telnet localhost 25000 . This will test that the Server application is working 4. Now test using the C client by typing: prog2client 25000

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions

Question

Compute the derivative of f(x)cos(-4/5x)

Answered: 1 week ago

Question

Discuss the process involved in selection.

Answered: 1 week ago

Question

Differentiate tan(7x+9x-2.5)

Answered: 1 week ago

Question

Explain the sources of recruitment.

Answered: 1 week ago

Question

6. Be able to choose and prepare a training site.

Answered: 1 week ago