diff --git a/README.md b/README.md index 0275219..6ed9e00 100644 --- a/README.md +++ b/README.md @@ -13,17 +13,17 @@ Here is a list of features: ## Getting Started -The library is distributed in a single amalgamated `chttp.c` file or as a static library, so you can: +The library is distributed as a single amalgamated `chttp.c` file or as a static library, so you can: -1) Download `chttp.c` and `chttp.h` from the repository (no need to clone the project) +1) Download `chttp.c` and `chttp.h` from the repository (no need to clone the project) and include them in your soource tree -2) or clone the project and build the static library my running +2) or clone the project and build the static library by running: ``` make libchttp.a ``` -If you used the amalgamated files, these are the flags required to build a project with cHTTP: +If you used the amalgamated files, these are the flags required to build a project: ```bash # Linux @@ -47,6 +47,8 @@ gcc your_app.c chttp.c -lws2_32 -DHTTPS_ENABLED -lssl -lcrypto ## Example +To give you a feel of the library, here are some examples of programs using cHTTP. To learn more, you can look at the files in `examples/` (they are intended to be skimmed in order). + Here is a client performing a GET request: ```c #include @@ -103,7 +105,7 @@ int main(void) cHTTP officially supports Linux and Windows. ## HTTPS support -Currently, HTTPS is implemented using OpenSSL which comes preinstalled on Linux but not Windows. It must be enabled by passing the `-DHTTPS_ENABLED` flag to gcc when building your program: +Currently, HTTPS is implemented using OpenSSL. If you are on Windows, you'll need to install it manually. ## Scalability cHTTP is designed to reach moderate scale to allow a compact and easy to work with implementation. The non-blocking I/O is based on `poll()` which I would say works up to about 500 concurrent connections. If you have more than that, you should consider APIs like epoll, io_uring, and I/O completion ports. If you do go that route, you can still reuse the cHTTP I/O independent core (see HTTP_Engine) to handle the HTTP protocol for you, both for client and server.