Skip to content

Python socket programming creates a web server. It handles one HTTP request at a time, processing incoming requests, retrieving files, constructing HTTP responses with headers, and sending them to clients. If a file is missing, it responds with an HTTP “404 Not Found” message.

Notifications You must be signed in to change notification settings

dogai/Web-Server-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

The fundamentals of socket programming for TCP connections in Python are explored. The creation of a socket, binding to a specific address and port, and handling of HTTP packets—sending and receiving them—are covered. Additionally, the basics of HTTP header format are grasped.

The task involves the development of a web server capable of handling one HTTP request at a time. The incoming HTTP request is accepted and parsed, the requested file is retrieved from the server’s file system, and an HTTP response message with the requested file preceded by header lines is constructed. The response is then transmitted directly to the client. If the requested file is unavailable on the server, an HTTP “404 Not Found” message is promptly sent back to the client.

Uploaded files contain: - Python code for the Web Server, - HelloWorld.html file for running the server, and - Report containing the explanation every step of the assignment.

About

Python socket programming creates a web server. It handles one HTTP request at a time, processing incoming requests, retrieving files, constructing HTTP responses with headers, and sending them to clients. If a file is missing, it responds with an HTTP “404 Not Found” message.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published