]> git.seodisparate.com - c_simple_http/commit
Handle multiple connections simultaneously
authorStephen Seo <seo.disparate@gmail.com>
Mon, 4 Nov 2024 06:22:58 +0000 (15:22 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Mon, 4 Nov 2024 06:25:27 +0000 (15:25 +0900)
commitfef2d154ce18d94bb8abffde5b3a95c0839e440c
treedb2981d6077c2e304992a8cfceb7b0f485f933f9
parentd4b3c3af8b1151f2bf6069c27afef37d6393739a
Handle multiple connections simultaneously

This commit changes the implementationt to store connected clients
file-descriptors and to iterate through them all periodically to handle
requests and to time-out stale connections. This means that even if one
connection is in progress, the program can still handle new connections
from other clients.

Note this does this not by threads but by taking advantage of
non-blocking io to handle each connection.

Fixes https://git.seodisparate.com/stephenseo/c_simple_http/issues/8 .
src/constants.h
src/main.c
src/signal_handling.c
src/signal_handling.h