In this project we will try to have a persistent connection, or keep alive, while the webserver operates with HTML files, Image file type, and other other file type.
I was provided with initial code for the webhandler, as well as the main function, and the task was for us to be able to have a persistent connection. Although I researched how to do it through sending files in chunks, it was really easy to modify the process request with a try and except in order to identify the errors.
After this I also deleted the line " self.connected_socket.close() "
Since we had to display various types of medias I decided to display an image as well as play an audio file. All I had to do was modify the HTML file I had previously created by adding the tags for a jpg and a wav file.
Comments