Socket
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 thebind
syscall. - Afterwards, begin listening for incoming clients with the
listen
syscall. At this stage, a value of 1024 is sufficient for thebacklog
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”.