3 ms·
Here's a fun webserver I wrote 20 years ago. It uses a pool allocator to make allocations easy to track (gives you a lot of the benefits of garbage collection,
by rwmj 4y ago
Here's a fun webserver I wrote 20 years ago. It uses a pool allocator to make allocations easy to track (gives you a lot of the benefits of garbage collection, but from pure C), and it also uses an interesting "inversion of control" (similar to "green threads" or coroutines) allowing the server to be written as straight-line code but actually being implemented using poll.
It actually ran a production site at an old company I worked at until fairly recently.
http://git.annexia.org/?p=c2lib.git;a=tree http://git.annexia.org/?p=c2lib.git;a=tree
http://git.annexia.org/?p=pthrlib.git;a=tree http://git.annexia.org/?p=pthrlib.git;a=tree
http://git.annexia.org/?p=rws.git;a=tree http://git.annexia.org/?p=rws.git;a=tree