Sockets
Finish setting up the server socket in the serve_forever function.
- Bind the socket to an IPv4 address and port specified at the command line (i.e.
server_port) with thebindsyscall. - Afterwards, begin listening for incoming clients with the
listensyscall. At this stage, a value of1024is sufficient for the backlog argument oflisten. When load testing in Performance, you may play around with this value and comment on how this impacts server performance.
After finishing this part, curl should output “Empty reply from server”.
Next task: GET request.