Sobes.tech
Junior — Senior

Creating a simple HTTP server on raw sockets to serve a static page

livecode

Task condition

It is necessary to build a web server that works directly through raw sockets. After establishing a TCP connection with the client, the server should correctly handle a request to the root path ("/") and serve a pre-prepared static HTML file. The description should outline the steps for setting up the server socket, the process of accepting connections, parsing the HTTP request, forming the HTTP response with headers and body, and closing the connection after sending the data.