HTTP web server example code

websrv

@ https://github.com/AgentD/websrv

Example tiny C web server for learning. Note the simplicity of HTTP 1 protocol and the socket code.

thttpd

@ https://acme.com/software/thttpd/

Production quality, but small and performant full-featured HTTP/1.1 server written in C.

epoll server

@ https://github.com/samsquire/epoll-server

Implementation of a socker server that can serve multiple clients on a single thread, by implementing a Krizhanovsky's ring buffer.

Turfwar

@ https://github.com/jart/cosmopolitan/blob/master/net/turfwar/turfwar.c

Implementation of a complete web application in C, including a web server. Highly scalable to many thousands of users. Also utilises a completely portable executable architecture.

quark by suckless

@ https://tools.suckless.org/quark/

Extremely small HTTP static content server.

nweb

@ https://nmon.sourceforge.net/pmwiki.php?n=Site.Nweb

Tiny 200 lines of C HTTP static page web server.

althttpd

@ https://sqlite.org/althttpd/file/althttpd.c

Small HTTP server written in C.

mongoose

@ https://github.com/cesanta/mongoose/

Embedded networking library for C. Very much designed for production.

civetweb

@ https://github.com/civetweb/civetweb

Fork of mongoose, before its license changed, and provides a permissive use license. Adds a set of features on top of what was part of the fork.

libhttp

@ https://github.com/lammertb/libhttp

A fork of mongoose and civetweb, with a focus on event driven communication and documentation.

Redbean

@ https://redbean.dev/

Web server that is built using the actually portable executable architecture. Embeds Lua, SQLite, and MbedTLS. Highly performant.

httpd

@ https://httpd.apache.org/

The popular and original httpd server, maintained by Apache.

nginx

@ https://nginx.org/en/

HTTP and reverse proxy server, full featured and extensible.

esp8266 web server

@ https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WebServer

Arduino code library for the esp8266 wifi module to enable operating the microcontroller as a web server.

socket(2) linux

@ https://linux.die.net/man/2/socket

Linux system interface for creating a communication endpoint.

socket(7) linux

@ https://linux.die.net/man/7/socket

Linux socket interface manual further info.

tcp(7) linux

@ https://linux.die.net/man/7/tcp

TCP using the socket interface in Linux.

webserver liburing

@ https://unixism.net/loti/tutorial/webserver_liburing.html

Example code, tutorial, and blog series on using io_uring to with an HTTP web server.

io_uring

@ https://kernel.dk/io_uring.pdf

Introduction to the io_uring Linux IO interface.