Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Write one TCP socket program (named webserver.cpp) to simulate a web server by using HTTP/1.1 and HTTP/1. Use the function fork() or pthread to...

Use the function fork() or pthread to provide the services for multiple connections. The server does the following:handles multiple HTTP requests (using fork( ) or pthread_create() ) For each HTTP request:accepts the request parses header obtains requested file from server’s file system creates HTTP response message:Status line with status code 200 or 404 header lines needs to include (if file is accessible): Connection: close Content-Length: xxxx Content-Type: text/html body part contains the contents of the requested file sends response to client after creating server, you can request files using a browser (e.g., IE explorer, telnet, webclient, ...) to test

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question