Update README

This commit is contained in:
2025-07-20 17:42:55 +02:00
parent 51cae898f8
commit 8be1b8e3d6
2 changed files with 22 additions and 3 deletions
+17 -2
View File
@@ -1,4 +1,19 @@
# cozis/http # chttp
This is an HTTP client and server library for C.
chttp is an HTTP client & server library for C.
## Why another HTTP library?
This is my attempt at solving the "HTTP problem" for the C language. Writing C programs that behave as or interact with web services is always more painful than necessary in C. You either need to use `libcurl` which is overkill in most situations or link a large scale web servers to serve simple pages. This library targets smaller scale use-cases and tries to be as nice as possible to work with. Even then, it is fast. No performance is left on the table unless there is a specific reason. And if you do want to work at larger scales by using more sophisticate I/O systems (io_uring, I/O completion ports, etc) you can reuse the core state machine of the library that is I/O independant. This is my attempt at solving the "HTTP problem" for the C language. Writing C programs that behave as or interact with web services is always more painful than necessary in C. You either need to use `libcurl` which is overkill in most situations or link a large scale web servers to serve simple pages. This library targets smaller scale use-cases and tries to be as nice as possible to work with. Even then, it is fast. No performance is left on the table unless there is a specific reason. And if you do want to work at larger scales by using more sophisticate I/O systems (io_uring, I/O completion ports, etc) you can reuse the core state machine of the library that is I/O independant.
I would be comfortable with chttp handling up to 1000 simultaneous connections. For anything more than that I would reuse chttp's I/O independant state machine with my own multi-threaded and more scalable I/O.
## Features & Limitations
* HTTP/1.1 server & client
* Cross-platform (Windows & Linux)
* TLS (HTTPS) support using OpenSSL
* Minimal dependencies (libc and OpenSSL)
* Non-blocking design based on `poll()`
* I/O independant core reusable with more sophisticated I/O models
* Virtual hosts
* Single-threaded
+4
View File
@@ -2,3 +2,7 @@ Allow no TLS builds
make sure no TLS builds work on windows make sure no TLS builds work on windows
Allow resolving requests from different threads Allow resolving requests from different threads
Find a way to make sure http.h and http.c are always up to date Find a way to make sure http.h and http.c are always up to date
parse Transfer-Encoding
Make it cross-platform
Find a way to compile OpenSSL on windows
handle 3xx client redirections